No project description provided
Project description
StaticResources for Starlette
Like StaticFile but for package resources.
Example:
import uvicorn
from starlette.applications import Starlette
from starlette_static_resources import StaticResources
from importlib_resources import files
app = Starlette()
app.mount('/', StaticResources(resources=files('example.data')), name='static')
uvicorn.run(app, host='0.0.0.0', port=8008)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file starlette-static-resources-0.1.2.tar.gz
.
File metadata
- Download URL: starlette-static-resources-0.1.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.5 Linux/5.11.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d725b039465bfaddacfeadca29ad38768c3ffa95d5b051f33a19eae04a3a8ee9 |
|
MD5 | 5c4a1278662f4d720d1f9aeac7683c8f |
|
BLAKE2b-256 | c773ba660cc43f5b2ccd05e4ec222311acdfd833233530ab6f360b4d513b2f63 |
File details
Details for the file starlette_static_resources-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: starlette_static_resources-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.5 Linux/5.11.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61b84a483fc5b1d9b524ee673e216203069e789b7e81bc45d6361c203fa76c2 |
|
MD5 | 32c74163e79d33ff82f7b6c4f2e181e3 |
|
BLAKE2b-256 | e8f6828c462dcdc1eaab6c4d0ae765f66b82ef884b75b28273467ec65b669b38 |