Skip to content

Bring back .get_entry_dict() functionality #629

Closed

Description

@SlowMo24

Is your feature request related to a problem? Please describe.

In V1 we had the following workflow:

  1. Convert a file to dict
  2. use pydantic to convert the dict to our custom types

I cannot fine a clear get_entry_dict() replacement.

Describe the solution you'd like

Convert a .bib file to a dict object.

Use cases

The library seemingly aims at providing the information of a .bib-file to the python program but our use-case is to simply forward the information in a different format.

Describe alternatives you've considered

Workaround code:

    for entry_key, entry_val in library.entries_dict.items():
        entry = dict()
        for field_key, field_val in entry_val.items():
            entry[field_key] = field_val
        entries_dict[entry_key] = entry

Remaining Questions (Optional)
Please tick all that apply:

  • I would be willing to contribute a PR to fix this issue.
  • This issue is a blocker, I'd be grateful for an early fix.

Activity

  1. MiWeiss commented on Oct 2, 2026

    @MiWeiss
    Collaborator

    Thanks for the report! It led to v2.1.0, released today, where dict(entry) now works (#631). The migration guide covers this too (#630):

    entries = [dict(entry) for entry in library.entries]
    entries_dict = {entry["ID"]: entry for entry in entries}

    Note that field values depend on your middleware, so they aren't necessarily strings.

  2. self-assigned this
    on Oct 2, 2026
  3. SlowMo24 commented on Oct 5, 2026

    @SlowMo24
    Author

    thanks for fixing this so quickly.

    Just a quick note: v1 was converting all input attribute keys (except "ID" and "ENTRYTYPE") to lowercase. v2 seems to respect the case given in the .bib-file. I think this is fine, it was just a breaking change for us I wanted to note here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions