Skip to main content

Traversal based asyncronious web framework

Project description

CI Code coverage Documentation Status

This is framework, around aiohttp_traversal.

Install

$ pip install aiotraversal

Tests

$ git clone https://github.com/zzzsochi/aiotraversal.git
$ cd aiotraversal
$ pip install pytest pytest-cov
$ py.test --cov ./aiotraversal --cov-report term-missing

Examples

$ git clone https://github.com/zzzsochi/aiotraversal.git
$ cd aiotraversal
$ pip install -e .
$ python3 examples/1-hello.py serve
$ curl http://localhost:8080
Hello World!
$ curl http://localhost:8080/json
{"text": "Hello World!"}

CHANGES

0.9.0 (2016-01-24)

  • Start documentation

  • Add settings;

  • Move Application.start to aiotraversal.serve.start_listening function;

  • Refactoring, refactoring, refactoring, refactoring…

0.8.0 (2016-01-10)

  • Started CHANGES;

  • New configuration process:

    def main():
        loop = asyncio.get_event_loop()
        app = Application()
    
        with app.configure(loop=loop) as config:
            config.include(func)
    
        app.start()
    
    def func(config):
        work_configure()
  • Add Configure.include_deferred;

  • Add modules for command line:

    • aiotraversal.cmd;

    • aiotraversal.logger;

    • aiotraversal.serve;

    import asyncio
    
    from aiotraversal import Application
    from aiotraversal.cmd import run
    
    def main():
        loop = asyncio.get_event_loop()
        app = Application()
    
        with app.configure(loop=loop) as config:
            config.include('aiotraversal.cmd')
            config.include('aiotraversal.logger')
            config.include('aiotraversal.serve')
    
        run(app, loop)
    
    if __name__ == '__main__':
        main()
    $ cmd
    usage: cmd [--loglevel WARNING] {help,serve} ...
    
    positional arguments:
      {help,serve}
        help              Print this help
        serve             Start web server
    
    optional arguments:
      --loglevel WARNING  Set log level
    
    $ cmd --loglevel=DEBUG serve
    INFO:aiotraversal.app:listening - localhost:8080
    ^CDEBUG:aiotraversal.cmd:finishing application
    DEBUG:aiotraversal.cmd:closing loop

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

aiotraversal-0.9.0.tar.bz2 (6.8 kB view details)

Uploaded Source

File details

Details for the file aiotraversal-0.9.0.tar.bz2.

File metadata

File hashes

Hashes for aiotraversal-0.9.0.tar.bz2
Algorithm Hash digest
SHA256 83b68564e2b4f46a65c673e9b51b7591ca62786afbecef13dfaf823712300e31
MD5 df3490422e93ecbfa5f04f2fa45f9e5b
BLAKE2b-256 47cea5834f994ce38b4907c381426297094afade3c754d40cef5f3a6a7fec2d9

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