Basic tornado-based python utilities.
Project description
Torncoder
Tornado Utility Library for various features.
This library contains a few common classes and helpers that:
- Make file serving easier.
- Make file uploads easier.
- Permit piping output from processes easier.
- Basic pool management.
(Static) FileHandler Utilities
tornado
's default web.StaticFileHandler
is a bit onerous and confusing to
subclass or otherwise use; torncoder
instead defines a slightly different
interface for similar purposes, but consolidates much of the work:
class MyFileHandler(AbstractFileHandler):
async def fetch_file_info(self, path):
# Validate path, then return a FileInfo tuple.
return FileInfo(...)
async def get_iter_content(self, path_handle, start, end):
# Iterate over the content from start/end.
# NOTE: 'path_handle' is the path argument by the above FileInfo.
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
torncoder-0.1.1.tar.gz
(9.3 kB
view details)
Built Distribution
torncoder-0.1.1-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file torncoder-0.1.1.tar.gz
.
File metadata
- Download URL: torncoder-0.1.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.7 Darwin/17.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 235f801e9119e594cabfd569092311e7f7825d9cafc1b3b9ececfa2b6010b736 |
|
MD5 | 1bfce0f0f28ff0f5787e4224af082503 |
|
BLAKE2b-256 | 2d38e8370c433ce6c9204f58d296afd3ae67cd7dcd024843fb757e4536f2dc3c |
File details
Details for the file torncoder-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: torncoder-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.7 Darwin/17.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7d5ee0c66a8f963dec2f55653b5b37c266c990eebbf5202f7bd0ab962c57deb |
|
MD5 | a1664842d3fb24953a25a79ec823281a |
|
BLAKE2b-256 | 547752812a7dfc3ff1db330395000216ccdc51d32c861cc770a3ff1ade0ea148 |