Skip to main content

Framework for building asynchronous websites and micro-services on top of ``aiohttp``

Project description

*This is preview. It’s pre-beta, pre-alpha, pre-anything, so don’t use it in real projects. More work is on the way.*

Framework for building asynchronous websites and micro-services on top of aiohttp

Basic example

This is how to run your epic_app’s webserver:

from sunhead.cli.commands.runserver import Runserver
from sunhead.cli.entrypoint import main as sunhead_main

commands = (
    Runserver("apic_app.server.SubclassOfSunHeadWorkersHttpServer"),
)


DEFAULT_ENVIRONMENT_VARIABLE = "EPIC_APP_SETTINGS_MODULE"
GLOBAL_CONFIG_MODULE = "epic_app.settings.base"


def main():
    sunhead_main(
        commands=commands,
        settings_ennvar=DEFAULT_ENVIRONMENT_VARIABLE,
        fallback_settings_module=GLOBAL_CONFIG_MODULE
    )


if __name__ == '__main__':
    main()

Features

You can run workers from basic console scripts up to the http-servers, connected to messaging streams, queues, etc. There are REST helper classes, CLI tools, settings incapsulation and other useful things.

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

sunhead-5.0.0.tar.gz (20.2 kB view hashes)

Uploaded Source

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