Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starlette-static-resources-0.1.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page