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.1.tar.gz (24.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page