{"id":23466114,"url":"https://github.com/lukaflpvc/dynamic-pydantic","last_synced_at":"2025-10-31T00:30:56.599Z","repository":{"id":269099852,"uuid":"906044954","full_name":"lukaflpvc/dynamic-pydantic","owner":"lukaflpvc","description":"create pydantic models dynamically","archived":false,"fork":false,"pushed_at":"2025-02-01T00:35:41.000Z","size":112,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T15:19:18.887Z","etag":null,"topics":["agentic-ai","instructor","llm","pydantic-v2","validation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukaflpvc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-20T03:41:50.000Z","updated_at":"2025-09-02T08:13:25.000Z","dependencies_parsed_at":"2024-12-20T22:45:31.822Z","dependency_job_id":"3bbcd36c-651c-4a04-b3a6-e43ccd9c7b82","html_url":"https://github.com/lukaflpvc/dynamic-pydantic","commit_stats":null,"previous_names":["lukafilipxvic/dynamic-pydantic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lukaflpvc/dynamic-pydantic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaflpvc%2Fdynamic-pydantic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaflpvc%2Fdynamic-pydantic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaflpvc%2Fdynamic-pydantic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaflpvc%2Fdynamic-pydantic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukaflpvc","download_url":"https://codeload.github.com/lukaflpvc/dynamic-pydantic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaflpvc%2Fdynamic-pydantic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281550024,"owners_count":26520577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","instructor","llm","pydantic-v2","validation"],"created_at":"2024-12-24T11:54:36.736Z","updated_at":"2025-10-31T00:30:56.196Z","avatar_url":"https://github.com/lukaflpvc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic Pydantic\n**Dynamic Pydantic is the easiest way for AI agents to create and validate tools and databases in runtime.**\n\nIt is a provides a powerful approach to creating pydantic models dynamically for any given task.\n\nThe project leverages Instructor and Pydantic to generate models dynamically based on provided prompt and context.\n\n## Installation\n```bash\nuv pip install dynamic-pydantic\n```\n\n## Contributing\nStart contributing by cloning the repository:\n```bash\ngit clone https://github.com/lukafilipxvic/dynamic-pydantic.git\n```\n\n## Usage\nThis package simplifies the interaction between language models and pydantic's ```create_model()``` function.\nBelow is a basic example showcasing the generation of a Pydantic schema with Cerebras' Llama 3.3 70b inference.\n\nDynamic Pydantic works with any OpenAI-compatible endpoint via LiteLLM.\n\n```\nfrom dynamic_pydantic import dynamic_model\n\ngenModel = dynamic_model(prompt='User = Name, Age')\n\nprint(f'{genModel.schema_json()}')\n\n# {\"properties\": {\"Name\": {\"default\": null, \"description\": \"The user's name\", \"title\": \"Name\", \"type\": \"string\"}, \"Age\": {\"default\": null, \"description\": \"The user's age\", \"title\": \"Age\", \"type\": \"integer\"}}, \"title\": \"User\", \"type\": \"object\"}\n\n```\n\n## License\nThis project is licensed under the terms of the MIT license.\n\nFor more details, refer to the LICENSE file in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaflpvc%2Fdynamic-pydantic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukaflpvc%2Fdynamic-pydantic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaflpvc%2Fdynamic-pydantic/lists"}