Skip to main content

Thin Python subprocess wrapper for the rdp-session Rust CLI

Project description

rdp-session Python Wrapper

Thin Python wrapper around the rdp-session Rust CLI.

The package invokes the CLI through subprocess.run, requests JSON output, and returns the parsed create-session report. It does not embed IronRDP directly.

Install

From PyPI:

python -m pip install rdp-session

PyPI wheels include the Windows x86_64 and ARM64 CLI binaries, so the wrapper can use the matching bundled rdp-session.exe immediately after installation.

python -m pip install -e .

From GitHub:

python -m pip install "git+https://github.com/jqwn/rdp-session.git"

As a pinned dependency:

rdp-session @ git+https://github.com/jqwn/rdp-session.git@<tag-or-commit>

Automatic binary download remains available for source/GitHub installs when no bundled, configured, or PATH binary is found. It is supported for released tags whose package version matches the release tag, for example 0.2.2 and v0.2.2. If you install from a branch or arbitrary commit, pass tool=... or set RDP_SESSION_BIN to a binary built from the same commit.

The Rust CLI is resolved in this order:

  • pass tool=... to create_session
  • set RDP_SESSION_BIN
  • use the bundled PyPI wheel binary
  • put rdp-session.exe on PATH
  • on Windows x86_64 or ARM64, automatically download the matching versioned release asset from GitHub and cache it under the user's local app data directory after verifying the release .sha256 sidecar

Bundled, cached, and newly downloaded binaries are verified against .sha256 sidecars before execution. This catches corruption and cache replacement, but it is not a substitute for code signing.

Use

Password from environment:

from rdp_session import create_session

report = create_session(
    host="127.0.0.1",
    username="appuser",
    password_env="RDP_PASSWORD",
    screenshot=r"C:\Temp\rdp-desktop.png",
)

print(report.detached)

Password through subprocess stdin:

from rdp_session import create_session

report = create_session(
    host="127.0.0.1",
    username="appuser",
    password="secret",
)

Do not pass passwords in command-line arguments. When password is provided, the wrapper sends it to the child process through stdin.

Project details


Download files

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

Source Distribution

rdp_session-0.2.2.tar.gz (8.9 MB view details)

Uploaded Source

Built Distribution

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

rdp_session-0.2.2-py3-none-any.whl (8.9 MB view details)

Uploaded Python 3

File details

Details for the file rdp_session-0.2.2.tar.gz.

File metadata

  • Download URL: rdp_session-0.2.2.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rdp_session-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7a1aade7950c85500e0dd991cea2fe67254b4b51869361772d5e921f802eb2d4
MD5 99c34def457fdf2584735043ba2f6875
BLAKE2b-256 3d5c7221eeee99e894c1fc4295ae42868c5d8c9bd1495584332b1fd176c02248

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdp_session-0.2.2.tar.gz:

Publisher: release.yml on jqwn/rdp-session

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rdp_session-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: rdp_session-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rdp_session-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0029a8601c94da20a3c42f0e170670169d600457b053a7ae66a2439faa8a9f18
MD5 8153bafb4b5ddfe173d54704d8e5f5ee
BLAKE2b-256 56b945d3b1256948725ca987e5c697e4ced4da0b908e265f925f6235a71562d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdp_session-0.2.2-py3-none-any.whl:

Publisher: release.yml on jqwn/rdp-session

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page