{"id":25714213,"url":"https://github.com/plateformeio/plateforme","last_synced_at":"2025-05-01T12:21:42.435Z","repository":{"id":273216782,"uuid":"803016708","full_name":"plateformeio/plateforme","owner":"plateformeio","description":"The Python framework for Data Applications","archived":false,"fork":false,"pushed_at":"2025-04-01T21:13:19.000Z","size":1747,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-25T01:11:40.788Z","etag":null,"topics":["api","app","asgi","async","data","db","fastapi","plateforme","pydantic","python","restx","services","sqlalchemy"],"latest_commit_sha":null,"homepage":"https://plateforme.io","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/plateformeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"plateformeio"}},"created_at":"2024-05-19T21:51:36.000Z","updated_at":"2025-04-16T21:26:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c46ea44c-53fc-492a-81fb-8a5c95af9760","html_url":"https://github.com/plateformeio/plateforme","commit_stats":null,"previous_names":["plateformeio/plateforme"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plateformeio%2Fplateforme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plateformeio%2Fplateforme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plateformeio%2Fplateforme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plateformeio%2Fplateforme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plateformeio","download_url":"https://codeload.github.com/plateformeio/plateforme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250735448,"owners_count":21478606,"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","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":["api","app","asgi","async","data","db","fastapi","plateforme","pydantic","python","restx","services","sqlalchemy"],"created_at":"2025-02-25T12:35:26.769Z","updated_at":"2025-05-01T12:21:42.404Z","avatar_url":"https://github.com/plateformeio.png","language":"Python","funding_links":["https://github.com/sponsors/plateformeio"],"categories":[],"sub_categories":[],"readme":"\u003cp style=\"text-align: center\"\u003e\n  \u003ca href=\"https://docs.plateforme.io\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/plateformeio/plateforme/refs/heads/main/docs/banner.png\" alt=\"Plateforme\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Plateforme Core - OSS (alpha release)\n\n[![ci](https://img.shields.io/github/actions/workflow/status/plateformeio/plateforme/ci.yml?branch=main\u0026logo=github\u0026label=ci)](https://github.com/plateformeio/plateforme/actions?query=event%3Apush+branch%3Amain+workflow%3Aci)\n[![pypi](https://img.shields.io/pypi/v/plateforme.svg)](https://pypi.python.org/pypi/plateforme)\n[![downloads](https://static.pepy.tech/badge/plateforme/month)](https://pepy.tech/project/plateforme)\n[![versions](https://img.shields.io/pypi/pyversions/plateforme.svg)](https://github.com/plateformeio/plateforme)\n[![license](https://img.shields.io/github/license/plateformeio/plateforme.svg)](https://github.com/plateformeio/plateforme/blob/main/LICENSE)\n\nPlateforme enables you to build and deploy modern data-driven applications and services in seconds with the power of [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy), [Pydantic](https://github.com/plateforme/plateforme), and [FastAPI](https://github.com/tiangolo/fastapi).\n\n## Help\n\nSee the [documentation](https://docs.plateforme.io) for more details.\n\n## Installation\n\nInstall using `pip install -U plateforme` or `conda install plateforme -c conda-forge`.\n\nFor more details and advanced installation options, see the [installation guide](https://docs.plateforme.io/latest/start/install) from the official documentation site.\n\n## A basic example\n\n### Create a simple application\n\n```python\nfrom typing import Self\n\nfrom plateforme import Plateforme\nfrom plateforme.api import route\nfrom plateforme.resources import ConfigDict, CRUDResource, Field\n\napp = Plateforme(debug=True, database_engines='plateforme.db')\n\nclass Rocket(CRUDResource):\n    code: str = Field(unique=True)\n    name: str\n    parts: list['RocketPart'] = Field(default_factory=list)\n    launched: bool = False\n\n    @route.post()\n    async def launch(self) -\u003e Self:\n        self.launched = True\n        return self\n\nclass RocketPart(CRUDResource):\n    __config__ = ConfigDict(indexes=[{'rocket', 'code'}])\n    rocket: Rocket\n    code: str\n    quantity: int\n```\n\n### Validate and use data\n\n```python\nsome_data = {\n    'code': 'FAL-9',\n    'name': 'Falcon 9',\n    'parts': [\n        {'code': 'dragon', 'quantity': 1},\n        {'code': 'raptor', 'quantity': 9},\n        {'code': 'tank', 'quantity': 1},\n    ],\n}\n\nrocket = Rocket.resource_validate(some_data)\nprint(repr(rocket))\n#\u003e Rocket(code='FAL-9')\n\nprint(repr(rocket.parts[0].code))\n#\u003e 'dragon'\n```\n\n### Persist data\n\n```python\n# Create the database schema\napp.metadata.create_all()\n\n# Persist the data\nwith app.session() as session:\n    session.add(rocket)\n    session.commit()\n\n# Query the data\nwith app.session() as session:\n    rocket = session.query(Rocket).filter_by(code='FAL-9').one()\n\nprint(repr(rocket))\n#\u003e Rocket(id=1, code='FAL-9')\n```\n\n### Run the application\n\n```bash\nuvicorn main:app\n```\n\n### Play with the API\n\n#### Use the built-in CRUD and query engine\n\nWith the built-in CRUD and query engine, you can easily create, read, update, and delete resources. The following query finds all parts in rocket `#1` whose part codes contain the sequence `ra`.\n\n```http\nGET http://localhost:8000/rockets/1/parts?.code=like~*ra* HTTP/1.1\n```\n\n```json\n[\n  {\n    \"id\": 1,\n    \"type\": \"rocket_part\",\n    \"code\": \"dragon\",\n    \"quantity\": 1\n  },\n  {\n    \"id\": 2,\n    \"type\": \"rocket_part\",\n    \"code\": \"raptor\",\n    \"quantity\": 9\n  }\n]\n```\n\n#### Use custom routes\n\nYou can also define custom routes to perform more complex operations. The following request launches rocket `#1` and persists in the database the `launched` flag to `true`.\n\n```http\nPOST http://localhost:8000/rockets/1/launch HTTP/1.1\n```\n\n```json\n{\n  \"id\": 1,\n  \"type\": \"rocket\",\n  \"code\": \"FAL-9\",\n  \"name\": \"Falcon 9\",\n  \"parts\": [\n    ...\n  ],\n  \"launched\": true\n}\n```\n\n### Use the built-in CLI\n\nPlateforme comes with a built-in CLI to help you automate common tasks. For instance, the following commands initialize a new project, build it, and start the server.\n\n```bash\n# Initialize the project\nplateforme init\n\n# Build the project\nplateforme build\n\n# Start the server\nplateforme start --reload\n```\n\nFor detailed documentation and more examples, see the [official documentation](https://docs.plateforme.io/latest/start).\n\n## Contributing\n\nFor guidance on setting up a development environment and how to make a contribution to Plateforme, read the [contributing guidelines](https://docs.plateforme.io/latest/about/community/contributing) from the official documentation site.\n\n## Reporting a security vulnerability\n\nSee our [security policy](https://github.com/plateformeio/plateforme/security/policy).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplateformeio%2Fplateforme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplateformeio%2Fplateforme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplateformeio%2Fplateforme/lists"}