* A web framework (including `.RequestHandler` which is subclassed to
create web applications, and various supporting classes).
-* Client- and server-side implementions of HTTP (`.HTTPServer` and
+* Client- and server-side implementations of HTTP (`.HTTPServer` and
`.AsyncHTTPClient`).
* An asynchronous networking library including the classes `.IOLoop`
and `.IOStream`, which serve as the building blocks for the HTTP
When the ``main`` function returns, the program exits, so most of the time for a
web server ``main`` should run forever. Waiting on an `asyncio.Event` whose
-``set()`` method is never called is a convenient way to make an asynchronus
+``set()`` method is never called is a convenient way to make an asynchronous
function run forever. (and if you wish to have ``main`` exit early as a part of
a graceful shutdown procedure, you can call ``shutdown_event.set()`` to make it
exit).
* Select a project, or create a new one.
* Depending on permissions required, you may need to set your app to
"testing" mode and add your account as a test user, or go through
- a verfication process. You may also need to use the "Enable
+ a verification process. You may also need to use the "Enable
APIs and Services" command to enable specific services.
* In the sidebar on the left, select Credentials.
* Click CREATE CREDENTIALS and click OAuth client ID.
def json_decode(value: str | bytes) -> Any:
"""Returns Python objects for the given JSON string.
- Supports both `str` and `bytes` inputs. Equvalent to `json.loads`.
+ Supports both `str` and `bytes` inputs. Equivalent to `json.loads`.
"""
return json.loads(value)
return f'<a href="{href}"{params}>{url}</a>'
# First HTML-escape so that our strings are all safe.
- # The regex is modified to avoid character entites other than & so
+ # The regex is modified to avoid character entities other than & so
# that we won't pick up ", etc.
text = _unicode(xhtml_escape(text))
return _URL_RE.sub(make_link, text)
"""
# RFC 3986 (URI)
- # The URI hostname ABNF is both complex (including detailed vaildation of IPv4 and IPv6
+ # The URI hostname ABNF is both complex (including detailed validation of IPv4 and IPv6
# literals) and not strict enough (a lot of punctuation is allowed by the ABNF even though
# it is not allowed by DNS). We simplify it by allowing square brackets and colons in any
# position, not only for their use in IPv6 literals.
self._thread.start()
self._start_select()
try:
- # The presense of this yield statement means that this coroutine
+ # The presence of this yield statement means that this coroutine
# is actually an asynchronous generator, which has a special
# shutdown protocol. We wait at this yield point until the
# event loop's shutdown_asyncgens method is called, at which point
"django_language",
parse_cookie("abc=def; unnamed; django_language=en").keys(),
)
- # Even a double quote may be an unamed value.
+ # Even a double quote may be an unnamed value.
self.assertEqual(parse_cookie('a=b; "; c=d'), {"a": "b", "": '"', "c": "d"})
# Spaces in names and values, and an equals sign in values.
self.assertEqual(
# Note change from _ to -.
morsel["max-age"] = str(max_age)
if httponly:
- # Note that SimpleCookie ignores the value here. The presense of an
+ # Note that SimpleCookie ignores the value here. The presence of an
# httponly (or secure) key is treated as true.
morsel["httponly"] = True
if secure: