Skip to main content

Common webapp scaffolding.

Project description

lassen

40.4881° N, 121.5049° W

Core utilities for MonkeySee web applications.

Not guaranteed to be backwards compatible, use at your own risk.

Structure

Stores: Each model is expected to have its own store. Base classes that provide standard logic are provided by lassen.store

  • StoreBase: Base class for all stores
  • StoreFilterMixin: Mixin for filtering stores that specify an additional schema to use to filter

Migrations: Lassen includes a templated alembic.init and env.py file. Client applications just need to have a migrations folder within their project root. After this you can swap poetry run alembic with poetry run migrate.

poetry run migrate upgrade head

Settings: Application settings should subclass our core settings. This provides a standard way to load settings from environment variables and includes common database keys.

from lassen.core.config import CoreSettings, register_settings

@register_settings
class ClientSettings(CoreSettings):
    pass

Schemas: For helper schemas when returning results via API, see lassen.schema.

Development

poetry install

createuser lassen
createdb -O lassen lassen_db
createdb -O lassen lassen_test_db

Unit Tests:

poetry run pytest

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

lassen-0.1.0.tar.gz (23.1 kB view hashes)

Uploaded Source

Built Distribution

lassen-0.1.0-py3-none-any.whl (20.1 kB view hashes)

Uploaded Python 3

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