Skip to main content

PyTrustStore 🔐

A Python application for working with Java keystore files.

Features ✨

  • Validate keystores against remote TLS resources
  • Query keystores for certificates and aliases
  • Get detailed information about keystore resources
  • Import server certificates and their CA chains
  • Make aliases explanatory and easy to understand

Installation 📦

Published Package Installation

Once PyTrustStore is published to PyPI:

# Using pip
pip install pytruststore

# Install as a global tool with uv
uv tool install pytruststore

Local Development

To work with PyTrustStore directly from the repository:

# Clone the repository
git clone https://gitlab.com/bdmorin/pytruststore.git
cd pytruststore

# Initialize with uv and install in development mode
uv init --existing
uv develop

# Run the tool
uv run -m pytruststore <command> <options>

System-Wide Installation Without PyPI

Install PyTrustStore on your system without publishing to PyPI:

# Navigate to the repository directory
cd /path/to/pytruststore

# Install using pip directly from the local directory
pip install .

# Or build and install a wheel
python -m build --wheel
pip install dist/pytruststore-*.whl

For detailed installation instructions, see the uv Installation Guide.
For local development and system-wide installation options, see the Local Development Guide.

Usage 🚀

From the Repository

When working directly from the repository:

# List all aliases in a keystore
uv run -m pytruststore list --keystore path/to/keystore.jks --password your-password

# Get detailed information about a certificate
uv run -m pytruststore info --keystore path/to/keystore.jks --password your-password --alias your-alias

# Validate a keystore against a remote TLS resource
uv run -m pytruststore validate --keystore path/to/keystore.jks --password your-password --url https://example.com

Using the Installed Command

If you installed PyTrustStore globally:

# List all aliases in a keystore
pytruststore list --keystore path/to/keystore.jks --password your-password

# Get detailed information about a certificate
pytruststore info --keystore path/to/keystore.jks --password your-password --alias your-alias

# Validate a keystore against a remote TLS resource
pytruststore validate --keystore path/to/keystore.jks --password your-password --url https://example.com

Using uv Tool Runner (After Publication)

Once PyTrustStore is published to PyPI:

# List all aliases in a keystore
uvx pytruststore list --keystore path/to/keystore.jks --password your-password

# Import server certificates from a URL
uvx pytruststore import --keystore path/to/keystore.jks --password your-password --url https://example.com

Using in a Project (After Publication)

If you added PyTrustStore to your project:

# Rename aliases to be more descriptive
uv run pytruststore rename --keystore path/to/keystore.jks --password your-password --alias old-alias --new-alias new-alias

# Auto-rename all aliases to be more descriptive
uv run pytruststore auto-rename --keystore path/to/keystore.jks --password your-password

Development 🛠️

For detailed development instructions, see the Development Guide.

# Clone the repository
git clone https://gitlab.com/bdmorin/pytruststore.git
cd pytruststore

# Initialize the project with uv
uv init --existing

# Install the project in development mode
uv develop

# Add development dependencies
uv add --dev pytest ruff

# Run tests
uv run pytest

# Run linting
uv run ruff check .

Documentation 📚

See the Documentation Index for all available documentation.

License 📄

Apache License 2.0

Metadata

Release files for pytruststore 0.1.1

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

Source distribution (sdist)

Source distribution for pytruststore 0.1.1
File Size Uploaded
pytruststore-0.1.1.tar.gz 196.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytruststore 0.1.1
File Interpreter ABI Platform
pytruststore-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 220.5 kB

Release files / pytruststore-0.1.1.tar.gz

Download URL pytruststore-0.1.1.tar.gz
Size 196.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e9a63d09636ba44b80f1b55dda5f8269805e4cc89119ec414ddb570e9ac983fa
BLAKE2b-256 checksum
How to use checksums
241ab8eec38ba5845e4351fe72611499e187495e857406087f993eb5400a747d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / pytruststore-0.1.1-py3-none-any.whl

Download URL pytruststore-0.1.1-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a8c2c4adfebe79fb5ccb2ce497aeac4f2e774e483bc0a37e2ee6b8183f72dc
BLAKE2b-256 checksum
How to use checksums
28bdf6a7337abdc78b3636ab81b4d6a80b74580cea9c0ef9328cedb2d589edd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

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