Skip to main content

PyVaultRCE

Remote Code Hosting client for PyVault.

Upload Python scripts to a PyVault server and execute them remotely — the source code never leaves the server. Clients only ever hold a 21-character hex Session ID.

Install

pip install PyVaultRCE

Quick Start

from pyvaultrce import CodeManager

# Upload a local .py file → get a 21-character Session ID
sid = CodeManager.enc("my_script.py")
# [PyVault] ✓ Uploaded  — Session ID : 3a7f1c9b2d0e8a5f41c7e

# Upload from a paste service URL
sid = CodeManager.enc_url("https://pastebin.com/abcXYZ123")

# Execute remotely (source stays on server)
CodeManager.run(sid)

# Upload with a short share link and library metadata
sid = CodeManager.enc(
    "my_script.py",
    label="analytics demo",
    libraries=["requests", "pandas"],
)

# Hide PyVault status messages while running
CodeManager.run(sid, show_terminal=False)

# Check metadata without incrementing execution counter
CodeManager.info(sid)

# Verify server is up
CodeManager.ping()

Configuration

Set PYVAULT_URL to point at your hosted PyVault server:

export PYVAULT_URL=https://your-server.replit.app

For local development the client uses http://localhost:5000 when PYVAULT_URL is not set. You can also control status output globally:

export PYVAULT_TERMINAL=off

Library names are metadata only. PyVault does not auto-install packages or execute dependency installers; install the libraries in the Python environment where CodeManager.run() executes.

API Reference

Method Description
CodeManager.enc(file_path) Upload a local .py file → returns Session ID
CodeManager.enc(file_path, label=..., libraries=[...]) Upload with a label and visible library metadata
CodeManager.enc_url(url) Download code from a paste URL and upload → returns Session ID
CodeManager.run(session_id, show_terminal=False) Fetch and execute code by Session ID with optional quiet status output
CodeManager.info(session_id) Get session metadata (no exec count increment)
CodeManager.ping() Check server connectivity
CodeManager.edit(session_id, file_path, admin_token=...) Replace stored code (admin or owner token)
CodeManager.delete(session_id, owner_token) Delete your own session

Supported Paste Services (enc_url)

  • pastebin.com
  • hastebin.com
  • dpaste.com
  • paste.ofcode.org
  • GitHub raw URLs
  • Any URL returning raw Python text

Error Handling

Exception When
FileNotFoundError Local file not found
ValueError Invalid Session ID or empty file
ConnectionError Server unreachable
TimeoutError Request timed out
RuntimeError Server error (404, 403, 500, etc.)
SyntaxError Remote code syntax error (during run)

Security

  • Session IDs are 21-character cryptographically random hex strings
  • Source code is never written to disk on the client
  • Code is encrypted at rest with Fernet on the server
  • Share links expose only session metadata and declared library names, never source
  • Admin edits require the admin access code; owner edits/deletes require the one-time owner token
  • Sessions never expire unless an expiry is explicitly selected

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvaultrce-2.4.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvaultrce-2.4.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file pyvaultrce-2.4.0.tar.gz.

File metadata

  • Download URL: pyvaultrce-2.4.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for pyvaultrce-2.4.0.tar.gz
Algorithm Hash digest
SHA256 39591d404f65cecf793a661c3a46bc38e077fb6d7e5e08bd92523cbdbd648bb2
MD5 6c6d4db98f059e2774acdc6f0ea2b12f
BLAKE2b-256 fefc50b48ea0eaa3e00ecdee89ae8bff0af7be831aa2140dd16ede2cda50e24c

See more details on using hashes here.

File details

Details for the file pyvaultrce-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyvaultrce-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for pyvaultrce-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 436bebe4d43e6d831a4fac7f1dc44c2d52403b9d5a058defc27da061bf786446
MD5 bb2922387de426749c450ab0ad743e3f
BLAKE2b-256 a86093c15bd3f881930e401d932eaf8c7653406259cc60f081c0ec811dbb4e59

See more details on using hashes here.

Release history Release notifications | RSS feed

2.5.0

2 files

This release

2.4.0 This release

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 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