Skip to main content

Opinionated persistence with FlaskQL

Project description

microcosm-flask

Opinionated Flask services.

Circle CI

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:

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

microcosm_flask-6.1.0-py3-none-any.whl (86.1 kB view details)

Uploaded Python 3

File details

Details for the file microcosm_flask-6.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for microcosm_flask-6.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a21090b27ed19b0bc2e3291efb89ce528e42b58a942f7a435101b1c0aebeb23
MD5 558db111f292299a2fe7d99a5f1d18ed
BLAKE2b-256 691e725f512b6d9b84573ebbf2ba9d92169c9cca072383a286dfbfa89f527a10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page