{"id":28286,"library":"springfield","title":"Springfield","description":"A backend agnostic data modeling entity library. Current version 0.9.1, release cadence is irregular. Designed for flexible data modeling with support for multiple backends.","status":"active","version":"0.9.1","language":"python","source_language":"en","source_url":"https://github.com/uncommoncode/springfield","tags":["data-modeling","entity","backend-agnostic"],"install":[{"cmd":"pip install springfield","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"springfield often used with pydantic for data validation","package":"pydantic","optional":true}],"imports":[{"note":"Entity is available directly from the top-level package.","wrong":"from springfield.models import Entity","symbol":"Entity","correct":"from springfield import Entity"},{"note":"Field is also at the top-level.","wrong":"from springfield.fields import Field","symbol":"Field","correct":"from springfield import Field"}],"quickstart":{"code":"from springfield import Entity, Field\n\nclass Person(Entity):\n    name: str = Field()\n    age: int = Field(default=0)\n\nperson = Person(name='Alice', age=30)\nprint(person.dict())","lang":"python","description":"Define an entity model with fields and instantiate it."},"warnings":[{"fix":"Use 'from springfield import Entity'.","message":"Using 'from springfield.models import Entity' leads to ImportError. Entity is at the top-level in version 0.9.x.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Pin to 'springfield>=0.9,<1' in requirements.","message":"The library is still pre-1.0, expect API changes. Pin your dependency.","severity":"gotcha","affected_versions":"<1.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Change import to 'from springfield import Entity'.","cause":"In version 0.9, Entity is exported from the top-level springfield module, not springfield.models.","error":"ImportError: cannot import name 'Entity' from 'springfield.models'"},{"fix":"Ensure you are using springfield >=0.9.0 and that Person is defined with Field() for each attribute. Alternatively, use .to_dict().","cause":"The .dict() method may not exist if using older version <0.9.0 or if the model is not set up correctly.","error":"AttributeError: 'Entity' object has no attribute 'dict'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}