Skip to main content

Dark Star

Project description

Dark Star

Dark Star is a web framework that provides filesystem routing for Starlette and first-class support for server-side rendering.

Dark Star routes are defined by their filesystem path and both the route's backend code and template are contained in the first page.

Motivation

Dark Star aims to provide an easy way to create web applications using the HATEOAS and HDA philosophies favoured by htmx. It also aims to reduce the boilerplate code normally needed when creating web apps. In particular, it looks to reduce the need of having a separate files for view functions and templates. It tries to embrace Locality of Behaviour by putting the view function code and template in the same file, and having the file's path be the route used by Starlette to access the code.

Installation

pip install darkstar

You can then run the included CLI with:

python -m darkstar create-app --help

To run your new app, you'll need an ASGI server installed, such a Hypercorn, Daphne, or Uvicorn.

To run with Uvicorn, first install it:

python -m pip install uvicorn[standard]

The run your app:

python -m uvicorn app:app

(This assumes your defined your app as the app variable in an app.py file.)

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

darkstar-0.1.5.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

darkstar-0.1.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file darkstar-0.1.5.tar.gz.

File metadata

  • Download URL: darkstar-0.1.5.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for darkstar-0.1.5.tar.gz
Algorithm Hash digest
SHA256 544d7078de0091d1b49d024c851ff14ad88601631f387c57a79accb8bdc82e94
MD5 195c089ef6a4b006716affc276b1be42
BLAKE2b-256 411e27693c10291d6d98853a00aabb14919b169647554bbc1b9de610c1d40e4c

See more details on using hashes here.

File details

Details for the file darkstar-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: darkstar-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for darkstar-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0b1e88f6c030c9829c0dcec88445db3d6d16ef7fa57fab97a8ae39f0edd2de04
MD5 fee167decb08af4777157bac1bc4905b
BLAKE2b-256 179c351388835ae81c329a99994321d84dcbbd92dc352c236d02244889baea71

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