{"repo":"jacebrowning/datafiles","free":true,"listed":false,"github":"https://github.com/jacebrowning/datafiles","clone":"git clone https://github.com/jacebrowning/datafiles.git","description":"A file-based ORM for Python dataclasses.","language":"Python","stars":213,"topics":["dataclasses","orm","serialization","filesystem","python","datafile","yaml","type-annotations","json","toml"],"license":"MIT","category":"databases-storage","readme_excerpt":"Datafiles: A file-based ORM for Python dataclasses Datafiles is a bidirectional serialization library for Python dataclasses to synchronize objects to the filesystem using type annotations. It supports a variety of file formats with round-trip preservation of formatting and comments, where possible. Object changes are automatically saved to disk and only include the minimum data needed to restore each object. Some common use cases include: - Coercing user-editable files into the proper Python types - Storing program configuration and state in version control - Loading data fixtures for demonstration or testing purposes - Synchronizing application state using file sharing services - Prototyping data models agnostic of persistence backends Watch my lightning talk for a demo of this in action! Overview Take an existing dataclass such as this example from the documentation: and decorate it with a directory pattern to synchronize instances: Then, work with instances of the class as normal: Changes to the object are automatically saved to the filesystem: Changes to the filesystem are automatically reflected in the object: Objects can also be restored from the filesystem: Installation Install this library directly into an activated virtual environment: or add it to your Poetry project: Documentation To see additional synchronization and formatting options, please consult the full documentation.","default_branch":null,"files":null,"tree":[],"storefront":"/r/jacebrowning","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jacebrowning/datafiles/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}