pyexpose
pyexpose is a Python library designed to streamline the process of exposing local services to the internet using various SSH-based providers, such as serveo.net and localhost.run. With pyexpose, developers can effortlessly share their local services with remote collaborators or external systems, eliminating the need for manual configuration and exposing an abstraction layer for seamless integration.
Installation
Install the pyexpose package with pip:
$ pip install pyexpose
Or install the latest package directly from GitHub with the async extra:
$ pip install git+https://github.com/hari01584/pyexpose
Example Usage
import asyncio
import threading
from http.server import ThreadingHTTPServer
from http.server import SimpleHTTPRequestHandler
class MyHttpRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
def do_GET(self):
self.send_response(200)
self.send_header("Content-type", "text/html")
self.end_headers()
html = f"31" # how do I modify this line to serve files?
self.wfile.write(bytes(html, "utf8"))
http_server = ThreadingHTTPServer(("0.0.0.0", 4457), MyHttpRequestHandler)
http_server_thread = threading.Thread(target=http_server.serve_forever)
http_server_thread.daemon = True
http_server_thread.start()
async def start_tunnel():
from pyexpose.providers.localhost_run import LocalRunConnector
connector = LocalRunConnector()
async with connector.connect() as session:
async with session.tunnel(4457) as tunnel:
print("Started tunnel, You can access your local server at: ", tunnel.ip)
await asyncio.sleep(100000)
asyncio.run(start_tunnel())
Please look into official docs for more information - https://pyexpose.readthedocs.io/en/latest/
Metadata
Release files for pyexpose 0.1.3
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 |
|---|---|---|---|---|
| pyexpose-0.1.3.tar.gz | 6.4 kB | Without provenance | Details for pyexpose-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyexpose-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pyexpose-0.1.3-py3-none-any.whl |
Total release size: 14.2 kB
Release files / pyexpose-0.1.3.tar.gz
| Download URL | pyexpose-0.1.3.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99540f9d4449c247cb8e6aaf3e7180500c8884f21592ea584cd03746a54a3af6
|
|
BLAKE2b-256 checksum How to use checksums |
be85adb6384384a468be5986a46378a2c68c67b7f9ffc2826ebef5cc697ef9a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.12.2 CPython/3.10.12
|
Release files / pyexpose-0.1.3-py3-none-any.whl
| Download URL | pyexpose-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5d1fe30d282990ba7cd10c6a86ad9fb4613e84cf839eed7a9bc91c3e9e79359
|
|
BLAKE2b-256 checksum How to use checksums |
f4f7ff8d7502051da7d0421e9254a4721e41154f1befe4052901de51cdaf4e09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.12.2 CPython/3.10.12
|
Security for pyexpose 0.1.3
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.