# microcosm-flask
Opinionated Flask services.
[![Circle CI](https://circleci.com/gh/globality-corp/microcosm-flask/tree/develop.svg?style=svg)](https://circleci.com/gh/globality-corp/microcosm-flask/tree/develop)
## Conventions
- Classify API endpoints according to an enumerated set of operations with well-defined naming conventions
- Handle errors consistently using a top-level error and nested sub-errrors
- Handle UUIDs as route path keys
- Protect endpoints with basic auth
- Use HAL JSON links to related resources to each other
- Use Swagger to publish endpoints for interoperability
- Automate generation of endpoints according to conventions:
- A health check API endpoint exposes service health
- RESTful endpoints provide CRUD operations on resources
- RESTful endpoints allows one resource to be related to another
- API discovery endpoints allow resource data to be discovered/spidered
- Swagger endpoints allow endpoint integration to be automated
## Setup
Create a virtualenv
```
mkvirtualenv microcosm-flask
```
Install dependencies
```
pip install -U -e .
```
## Tests
Run the tests
```
pytest
```
## Linting
Lint the code:
```shell
NAME=microcosm_flask ./entrypoint.sh lint
NAME=microcosm_flask ./entrypoint.sh typehinting
```
## Configuration
- The object graph's `debug` and `testing` flags are propagated to the Flask application
Raw data
{
"_id": null,
"home_page": "https://github.com/globality-corp/microcosm-flask",
"name": "microcosm-flask",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "microcosm",
"author": "Globality Engineering",
"author_email": "engineering@globality.com",
"download_url": null,
"platform": null,
"description": "# microcosm-flask\n\nOpinionated Flask services.\n\n[![Circle CI](https://circleci.com/gh/globality-corp/microcosm-flask/tree/develop.svg?style=svg)](https://circleci.com/gh/globality-corp/microcosm-flask/tree/develop)\n\n\n## Conventions\n\n - Classify API endpoints according to an enumerated set of operations with well-defined naming conventions\n - Handle errors consistently using a top-level error and nested sub-errrors\n - Handle UUIDs as route path keys\n - Protect endpoints with basic auth\n - Use HAL JSON links to related resources to each other\n - Use Swagger to publish endpoints for interoperability\n - Automate generation of endpoints according to conventions:\n - A health check API endpoint exposes service health\n - RESTful endpoints provide CRUD operations on resources\n - RESTful endpoints allows one resource to be related to another\n - API discovery endpoints allow resource data to be discovered/spidered\n - Swagger endpoints allow endpoint integration to be automated\n\n## Setup\n\nCreate a virtualenv\n\n```\nmkvirtualenv microcosm-flask\n```\n\nInstall dependencies\n\n```\npip install -U -e .\n```\n\n## Tests\n\nRun the tests\n\n```\npytest\n```\n\n## Linting\n\nLint the code:\n\n```shell\nNAME=microcosm_flask ./entrypoint.sh lint\nNAME=microcosm_flask ./entrypoint.sh typehinting\n```\n\n\n## Configuration\n\n - The object graph's `debug` and `testing` flags are propagated to the Flask application\n",
"bugtrack_url": null,
"license": null,
"summary": "Opinionated persistence with FlaskQL",
"version": "6.1.0",
"project_urls": {
"Homepage": "https://github.com/globality-corp/microcosm-flask"
},
"split_keywords": [
"microcosm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "691e725f512b6d9b84573ebbf2ba9d92169c9cca072383a286dfbfa89f527a10",
"md5": "558db111f292299a2fe7d99a5f1d18ed",
"sha256": "5a21090b27ed19b0bc2e3291efb89ce528e42b58a942f7a435101b1c0aebeb23"
},
"downloads": -1,
"filename": "microcosm_flask-6.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "558db111f292299a2fe7d99a5f1d18ed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 86084,
"upload_time": "2024-06-26T22:30:18",
"upload_time_iso_8601": "2024-06-26T22:30:18.390966Z",
"url": "https://files.pythonhosted.org/packages/69/1e/725f512b6d9b84573ebbf2ba9d92169c9cca072383a286dfbfa89f527a10/microcosm_flask-6.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-26 22:30:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "globality-corp",
"github_project": "microcosm-flask",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "microcosm-flask"
}