Skip to main content

remote-expose

A Python package that allows you to easily expose local files through a public URL using ngrok.

Installation

pip install remote-expose

Usage

from remote_expose import exposeRemote, exposeRemoteAsync

# Synchronous usage with context manager
with exposeRemote('path/to/your/file.txt') as url:
    print(f"Your file is available at: {url}")
    # The file will be accessible at the URL while in this context
    # Once the context is exited, the tunnel will be closed if no other files are being exposed

# Multiple files can be exposed simultaneously
with exposeRemote('file1.txt') as url1, exposeRemote('file2.txt') as url2:
    print(f"File 1 is at: {url1}")
    print(f"File 2 is at: {url2}")

# Async usage with async context manager
import asyncio

async def expose_files():
    async with exposeRemoteAsync('file1.txt') as url1, \
              exposeRemoteAsync('file2.txt') as url2:
        print(f"File 1 is at: {url1}")
        print(f"File 2 is at: {url2}")
        await asyncio.sleep(60)  # Keep files exposed for 60 seconds

# Run the async function
asyncio.run(expose_files())

Features

  • Easy-to-use context manager interface
  • Async support with async context manager
  • Automatic resource cleanup
  • Support for exposing multiple files simultaneously
  • Secure file serving (no directory listing)
  • Thread-safe implementation
  • Automatic port management
  • Efficient resource sharing (single server for multiple files)

Requirements

  • Python 3.7+
  • ngrok account (free tier works fine)
  • pyngrok

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Release files for remote-expose 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remote-expose 0.0.3
File Size Uploaded
remote_expose-0.0.3.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remote-expose 0.0.3
File Interpreter ABI Platform
remote_expose-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / remote_expose-0.0.3.tar.gz

Download URL remote_expose-0.0.3.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c7639dbb009d0b5b7b481a94c4c579d8a6152e2ef114617596cec7375ad5e28f
BLAKE2b-256 checksum
How to use checksums
3df004d01821c1eba9829f6f56f5d38f129a5976d64c616b36cac27a1ca58e28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / remote_expose-0.0.3-py3-none-any.whl

Download URL remote_expose-0.0.3-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd6a88bd59be0ca57118b9917c9ef139f439dc501d7c388ccaaf571bee8bc10c
BLAKE2b-256 checksum
How to use checksums
b99aa29c6ce09dfa2c99e4c112de20a078ac4d78214e593a3c3c73d002cc29f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page