semvec/pypi-packages huggingface dataset:
txasgiresource 2.2.1
ASGI implemented as a Twisted resource
License: MIT

txasgiresource
==============

txasgiresource is `ASGI <http://channels.readthedocs.io/en/latest/asgi.html>`_ implemented as a Twisted Web Resource,
very similar to `WSGIResource <http://twistedmatrix.com/documents/current/api/twisted.web.wsgi.WSGIResource.html>`_.

This is inspired by `Daphne <https://github.com/django/daphne/>`_ but somewhat implemented from specs.

It can also run as a daemon.

The code is available on `GitHub <https://github.com/JohnDoee/txasgiresource>`_

Usage
-----

As Twisted Resource
~~~~~~~~~~~~~~~~~~~
.. code-block:: python

    from twisted.web import server

    from yourdjangoproject.routing import application

    resource = ASGIResource(application)
    site = server.Site(resource)

    # If we are done with the resource, make sure to stop it.

    yield resource.stop()

As ASGI Protocol server
~~~~~~~~~~~~~~~~~~~~~~~
::

    twistd -n txasgi -a yourdjangoproject.routing:application

As ASGI Protocol server on a different port and ip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

    twistd -n txasgi -a yourdjangoproject.asgi:channel_layer -d tcp:5566:interface=0.0.0.0

Supported specifications
------------------------

.. csv-table::
   :header: "Specification", "Supported"

   "asgi2", "Yes, through compatibility handler"
   "asgi3", "Yes"
   "HTTP", "Yes, v2.0"
   "Websocket", "Yes, v2.0"
   "Lifespan", "No"


Status
------

Master branch
~~~~~~~~~~~~~~
.. image:: https://coveralls.io/repos/github/JohnDoee/txasgiresource/badge.svg?branch=master
   :target: https://coveralls.io/github/JohnDoee/txasgiresource?branch=master
.. image:: https://travis-ci.org/JohnDoee/txasgiresource.svg?branch=master
   :target: https://travis-ci.org/JohnDoee/txasgiresource


Develop branch
~~~~~~~~~~~~~~
.. image:: https://coveralls.io/repos/github/JohnDoee/txasgiresource/badge.svg?branch=develop
   :target: https://coveralls.io/github/JohnDoee/txasgiresource?branch=develop
.. image:: https://travis-ci.org/JohnDoee/txasgiresource.svg?branch=develop
   :target: https://travis-ci.org/JohnDoee/txasgiresource

License
-------

MIT, see LICENSE
toml-config 0.1.3
Python library that simplifies parsing and creating Toml configuration files.
License: MIT

# toml_config
Python library that simplifies parsing and creating Toml configuration files.
Wrapper on [toml](https://github.com/uiri/toml)

## installation

To install a module run the command:

```pip install toml_config```

## Using

To get started, import the module. Create an instance of the Config class
by passing as a parameter the path to an existing file or the path where this file
will be created.And then you can read parameters from the file and write parameters to the file.

Example.
Creating a file and writing values.

```main.py```:
```python
from toml_config.core import Config

my_config = Config('app.config.toml')
my_config.add_section('app').set(key='value',other_key=[1,2,3])
```



```app.config.toml```:
```toml
[app]
key = "value"
other_key = [ 1, 2, 3,]
```