publichost
Make localhost public
Share your local web apps instantly with a public URL.
🔗 Visit publichost.dev
🚀 Installation
pip install publichost
🏁 Quick Start
Expose any web server in one line.
from publichost import Tunnel
tunnel = Tunnel(port=3000) # Expose local port 3000
print(f"🔗 {tunnel.public_url}") # Get your public link
Example Output:
🔗 https://x8k2p.publichost.dev
Your local app is now online and shareable.
🌍 Works with Any Python Web Framework
Flask
from flask import Flask
from publichost import Tunnel
app = Flask(__name__)
tunnel = Tunnel(port=5000)
@app.route("/")
def home():
return "Hello, publichost!"
if __name__ == "__main__":
print(f"🔗 {tunnel.public_url}")
app.run(port=5000)
FastAPI
from fastapi import FastAPI
from publichost import Tunnel
import uvicorn
app = FastAPI()
tunnel = Tunnel(port=8000)
@app.get("/")
async def read_root():
return {"message": "Hello, publichost!"}
if __name__ == "__main__":
print(f"🔗 {tunnel.public_url}")
uvicorn.run(app, host="127.0.0.1", port=8000)
Works with any Python web server, including Django, Quart, Starlette, and more.
🔧 Custom Subdomains
By default, publichost assigns a random subdomain like x8k2x.publichost.dev.
To set a custom subdomain, pass it as an argument:
tunnel = Tunnel(port=5000, subdomain="mycustomapp")
Your app will be available at https://mycustomapp.publichost.dev.
Subdomain Rules:
- Must be 6-32 characters
- Can contain letters, numbers, and hyphens
- Cannot be a reserved system word (e.g.,
admin,www,api)
📚 How It Works
- Install
publichost - Add one line of code
- Get a public URL instantly
For more details, visit publichost.dev.
Metadata
Release files for publichost 0.1.6
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 |
|---|---|---|---|---|
| publichost-0.1.6.tar.gz | 7.4 kB | Without provenance | Details for publichost-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| publichost-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for publichost-0.1.6-py3-none-any.whl |
Total release size: 15.1 kB
Release files / publichost-0.1.6.tar.gz
| Download URL | publichost-0.1.6.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
832708c02381d3fa481135ec9ca51f1b7659b226b7ed4ed4b4f0601868f98b63
|
|
BLAKE2b-256 checksum How to use checksums |
dbc28287671b302c26da531d6b15dedb7c346012ee3bb5495667cf6e8944c075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / publichost-0.1.6-py3-none-any.whl
| Download URL | publichost-0.1.6-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7cc0dfd88813051a477f33ce21f3d47b3eed924fa0d717d277df79dbde6587a
|
|
BLAKE2b-256 checksum How to use checksums |
c303934253710dce8d83e5fb6f3bef24ce23a1cc8df2826d3889664058414b00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for publichost 0.1.6
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.