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.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file starlette-static-resources-0.1.1.tar.gz.

File metadata

  • Download URL: starlette-static-resources-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.6 Linux/5.8.0-48-generic

File hashes

Hashes for starlette-static-resources-0.1.1.tar.gz
Algorithm Hash digest
SHA256 daf093d99c8ff08b976866c0a95e5845cd29456bda79e525184c55339be17031
MD5 0eea8df6eef8257ca59915a4acddf4da
BLAKE2b-256 01b64f2e488ccc61114337ded06ead45307369250e18cdb268d178abda245a97

See more details on using hashes here.

File details

Details for the file starlette_static_resources-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for starlette_static_resources-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 188a5a42152f22f6f3a8967610b4be092c1c9e29a3f1b364c7a517608c1afa09
MD5 d2f1a858c596691bd88ceef6976ec71e
BLAKE2b-256 3bc9ee62e9c5a102758c5bee47abcc3c801625d798e764c22a0817e62b6648b7

See more details on using hashes here.

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