datafiles
datafiles copied to clipboard
A file-based ORM for Python dataclasses.
Closes #270
I'm seeing an error when using Union type. ```py from typing import Union from datafiles import datafile, Missing @datafile("inventory/items/{self.name}.yml") class InventoryItem: """Class for keeping track of an item in inventory."""...
This will let us drop `typing_extensions` as a dependency and simplify CI jobs.
Hi there, I'm new to datafiles but found it very useful. However, my codebase has a TypedDict, which causes an error. ``` from datafiles import datafile from dataclasses import dataclass...
Hi, I discovered this project 2 days ago and I thing it's pretty cool. However, I still yet haven't found how to properly integrate it with dataclasses using Schemas libraries....
Is there a way to map existing files with the same schema _that do not match a repeatable pattern on disk_ to a datafiles Model instance manually? The use case...
`List[int]` cannot be mapped to a converter when lazy annotations are enabled (`from __future__ import annotations`).
See this test reproducing the failure: https://github.com/jacebrowning/datafiles/blob/e8fc6fd7be8ab15897facfcfa5cc91982849958b/tests/test_orm_usage.py#L75-L80
There's a test demonstrating the expected behavior here: https://github.com/jacebrowning/datafiles/blob/79775941750c7bad8a3a00c1ba272a2f058286a0/tests/test_setup.py#L106-L112
This test demonstrates the expected functionality: https://github.com/jacebrowning/datafiles/blob/a51507b0d165cbc0d0e669ea702d55ea207f27ea/tests/test_saving.py#L408-L450 This appears to be an issue with the YAML library: https://sourceforge.net/p/ruamel-yaml/tickets/318/