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
Close
Hashes for starlette-static-resources-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d725b039465bfaddacfeadca29ad38768c3ffa95d5b051f33a19eae04a3a8ee9 |
|
MD5 | 5c4a1278662f4d720d1f9aeac7683c8f |
|
BLAKE2b-256 | c773ba660cc43f5b2ccd05e4ec222311acdfd833233530ab6f360b4d513b2f63 |
Close
Hashes for starlette_static_resources-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61b84a483fc5b1d9b524ee673e216203069e789b7e81bc45d6361c203fa76c2 |
|
MD5 | 32c74163e79d33ff82f7b6c4f2e181e3 |
|
BLAKE2b-256 | e8f6828c462dcdc1eaab6c4d0ae765f66b82ef884b75b28273467ec65b669b38 |