Ravenports generated: 16 Jun 2020 12:52
[ravenports.git] / bucket_89 / python-asgiref
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-asgiref
4 VERSION=                3.2.8
5 KEYWORDS=               python
6 VARIANTS=               py38 py37
7 SDESC[py37]=            ASGI specs, helper code, and adapters (PY37)
8 SDESC[py38]=            ASGI specs, helper code, and adapters (PY38)
9 HOMEPAGE=               https://github.com/django/asgiref/
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/a/asgiref
14 DISTFILE[1]=            asgiref-3.2.8.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py37]=            single
17 SPKGS[py38]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py37]=            PY38=OFF PY37=ON
22 VOPTS[py38]=            PY38=ON PY37=OFF
23
24 DISTNAME=               asgiref-3.2.8
25
26 GENERATED=              yes
27
28 [PY37].USES_ON=                         python:py37
29
30 [PY38].USES_ON=                         python:py38
31
32 [FILE:3227:descriptions/desc.single]
33 asgiref
34 =======
35
36 ASGI is a standard for Python asynchronous web apps and servers to
37 communicate
38 with each other, and positioned as an asynchronous successor to WSGI. You
39 can
40 read more at https://asgi.readthedocs.io/en/latest/
41
42 This package includes ASGI base libraries, such as:
43
44 * Sync-to-async and async-to-sync function wrappers, ``asgiref.sync``
45 * Server base classes, ``asgiref.server``
46 * A WSGI-to-ASGI adapter, in ``asgiref.wsgi``
47
48 Function wrappers
49 -----------------
50
51 These allow you to wrap or decorate async or sync functions to call them
52 from
53 the other style (so you can call async functions from a synchronous thread,
54 or vice-versa).
55
56 In particular:
57
58 * AsyncToSync lets a synchronous subthread stop and wait while the async
59   function is called on the main thread's event loop, and then control is
60   returned to the thread when the async function is finished.
61
62 * SyncToAsync lets async code call a synchronous function, which is run in
63   a threadpool and control returned to the async coroutine when the
64 synchronous
65   function completes.
66
67 The idea is to make it easier to call synchronous APIs from async code and
68 asynchronous APIs from synchronous code so it's easier to transition code
69 from
70 one style to the other. In the case of Channels, we wrap the (synchronous)
71 Django view system with SyncToAsync to allow it to run inside the
72 (asynchronous)
73 ASGI server.
74
75 Note that exactly what threads things run in is very specific, and aimed to
76 keep maximum compatibility with old synchronous code. See
77 "Synchronous code & Threads" below for a full explanation.
78
79 Threadlocal replacement
80 -----------------------
81
82 This is a drop-in replacement for ``threading.local`` that works with both
83 threads and asyncio Tasks. Even better, it will proxy values through from a
84 task-local context to a thread-local context when you use sync_to_async
85 to run things in a threadpool, and vice-versa for async_to_sync.
86
87 If you instead want true thread- and task-safety, you can set
88 thread_critical on the Local object to ensure this instead.
89
90 Server base classes
91 -------------------
92
93 Includes a StatelessServer class which provides all the hard work of
94 writing a stateless server (as in, does not handle direct incoming sockets
95 but instead consumes external streams or sockets to work out what is
96 happening).
97
98 An example of such a server would be a chatbot server that connects out to
99 a central chat server and provides a "connection scope" per user chatting
100 to
101 it. There's only one actual connection, but the server has to separate
102 things
103 into several scopes for easier writing of the code.
104
105 You can see an example of this being used in [frequensgi].
106
107 WSGI-to-ASGI adapter
108 --------------------
109
110 Allows you to wrap a WSGI application so it appears as a valid ASGI
111 application.
112
113 Simply wrap it around your WSGI application like so::
114
115     asgi_application = WsgiToAsgi(wsgi_application)
116
117 The WSGI application will be run in a synchronous threadpool, and the
118 wrapped
119 ASGI application will be one that accepts http class messages.
120
121 Please note that not all extended features of WSGI may be supported (such
122 as
123 file handles for incoming POST bodies).
124
125 Dependencies
126 ------------
127
128 asgiref requires Python 3.5 or higher.
129
130 Contributing
131 ------------
132
133
134
135 [FILE:99:distinfo]
136 a46c83b7d46212ec937e9ddb571cda2b1384b3d02f7edde9372e2778d1782d38        25469 asgiref-3.2.8.tar.gz
137