Skip to main content

Lightweight web framework for building APIs and backends

Project description

Travis CI CodeCov CodeFactor

Lightweight web framework (wink, wink) for building APIs and backends. Reasonably fast in execution, developer friendly. If you need gazillions of requests served by single process in a second then there are better options than Kristall. I’m happy when it’s not slower than Flask.

Why

Some frameworks suck here, others suck there and none is good at all things I want. I decided to build a WSGI application tool that’s based on Werkzeug and is simpler than Flask. Sure, there are Flask extensions that make writing REST APIs simpler like Flask-RESTFul and Flask-RESTPlus but they are built on top of Flask and do many extra things that are better done by others, or not done at all. I wanted something that is somewhere in between Falcon and Flask. Simplicity of Falcon with convenience of Flask.

But since not everything sucks in Falcon I’d grab some ideas, like resourceful routing without need to subclass specific Resource base class, or only static route registration.

What

  • resourceful routing

  • static route registration

  • only JSON content type supported

  • very limited automatic coercion to JSON

That’s it for now.

Future developments:

  • JWT-based resource access control (optional)

  • CORS support (optional)

What not

  • no decorator-based route registration - there’s only one way to register routes and it is explicit

  • no built-in support for any other content type than application/json on both input and output

  • no fancy JSON de/encoding, only builtin json module is used in default JSON handling - use schema parsing/validating library eg. Marshmallow or Colander if you need anything beyond that; default behaviour may be customised to some degree by providing JSON decoder and encoder classes

How

Really very thin wrapper over Werkzeug utility functions and classes. Seriously, I’m not calling this a framework. Not yet. It consists of Application class that’s and entry point to runtime and Request/Response objects that in fact are Werkzeug’s built in wrappers reconfigured to support only JSON as transport media with some convenience methods.

Runtime dependencies

  • Python 3.7

  • Werkzeug 0.16

These are minimal versions of requirements.

Project details


Download files

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

Source Distribution

kristall-0.0.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

kristall-0.0.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file kristall-0.0.1.tar.gz.

File metadata

  • Download URL: kristall-0.0.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for kristall-0.0.1.tar.gz
Algorithm Hash digest
SHA256 432f31c49996799dc2f0c4b3a735dd005bce8d06052facca8d2d8c28e7b88e51
MD5 d5a0e65ef34e32772a9d5de0e4899647
BLAKE2b-256 9e9c0b296518b2cc0a70ba6c45c657640b41cffaf63993e77f05b866b14cd5ff

See more details on using hashes here.

File details

Details for the file kristall-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: kristall-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for kristall-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 40c71d4a9bd88ae5e4d6b35602c909ce2e0b6ae513e07423d1fac2e3a1417e4f
MD5 ec0fedfbf313c3d7373f78106183cbba
BLAKE2b-256 81d9b07944f5fa73a0551b3907db9b15f3800fa30a0cfe7e1ca589248bf36483

See more details on using hashes here.

Supported by

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