# 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": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "microcosm",
"author": "Globality Engineering",
"author_email": "engineering@globality.com",
"download_url": "https://files.pythonhosted.org/packages/43/58/9eb45fa2b402fac07dd075f957336560e9314bc6af0c64f687314e0472df/microcosm-flask-4.1.6.tar.gz",
"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\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Opinionated persistence with FlaskQL",
"version": "4.1.6",
"project_urls": {
"Homepage": "https://github.com/globality-corp/microcosm-flask"
},
"split_keywords": [
"microcosm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43589eb45fa2b402fac07dd075f957336560e9314bc6af0c64f687314e0472df",
"md5": "b45d77d36ef9f7ab0874ae0487a943a9",
"sha256": "e6275780721ce69081956f46e4c579b176f79be2a1418da19844346057bd8c08"
},
"downloads": -1,
"filename": "microcosm-flask-4.1.6.tar.gz",
"has_sig": false,
"md5_digest": "b45d77d36ef9f7ab0874ae0487a943a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 57338,
"upload_time": "2024-03-15T15:48:16",
"upload_time_iso_8601": "2024-03-15T15:48:16.229293Z",
"url": "https://files.pythonhosted.org/packages/43/58/9eb45fa2b402fac07dd075f957336560e9314bc6af0c64f687314e0472df/microcosm-flask-4.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-15 15:48:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "globality-corp",
"github_project": "microcosm-flask",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"circle": true,
"tox": true,
"lcname": "microcosm-flask"
}