FastHTML on 🤗 Spaces
Deploy a FastHTML application to Hugging Face Spaces for free with one command!
Quickstart
- Create a free account on Hugging Face
- Go to your account settings and create an access token with write access. Keep this token safe and don't share it.
- Set the
HF_TOKENenvironment variable to that token - Install fasthtml-hf:
pip install fasthtml-hf - HuggingFace needs
fasthtml-hfto run your space, so add it to your requirements.txt file. - At the top of your
main.pyaddfrom fasthtml_hf import setup_hf_backup, and just before you run uvicorn addsetup_hf_backup(app). If you run uvicorn in anif __name__ == "__main__"block, you'll need to callsetup_hf_backup(app)before theifblock. - Run
fh_hf_deploy <space_name>, replacing<space_name>with the name you want to give your space.
By default this will upload a public space. You can make it private with --private true.
Configuration
The space will upload a backup of your database to a Hugging Face Dataset. By default it will be private and its name will be <your-huggingface-id>/space-backup. You can change this behavior in the config.ini file. In not provided, a default file will be created with the contents (note that the [DEFAULT] line is required at the top):
[DEFAULT]
dataset_id = space-backup
db_dir = data
private_backup = True
interval = 15 # number of minutes between periodic backups
If you so choose, you can disable the automatic backups and use persistent storage instead for $5/month (USD).
Metadata
Release files for fasthtml-hf 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fasthtml_hf-0.1.5.tar.gz | 12.9 kB | Without provenance | Details for fasthtml_hf-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fasthtml_hf-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for fasthtml_hf-0.1.5-py3-none-any.whl |
Total release size: 25.8 kB
Release files / fasthtml_hf-0.1.5.tar.gz
| Download URL | fasthtml_hf-0.1.5.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a687e77c1b330a4410cf7c18864bf82753e97d45b69b7ce89d97b6c2245b2e6
|
|
BLAKE2b-256 checksum How to use checksums |
91fb145dca8d6e5c9b9b64b66065a91c6105d9091a2e6ebdc63f492a8fcdbddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fasthtml_hf-0.1.5-py3-none-any.whl
| Download URL | fasthtml_hf-0.1.5-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
219200564cc51ee07499e0634e86fe1363f48068f10d6f859edcc404f15a8851
|
|
BLAKE2b-256 checksum How to use checksums |
20f5a6e6883c3978c3c45d460ebdab387b46484c3861038afe472b16ef7c5813
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Security for fasthtml-hf 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.