Skip to main content

A Python application for working with Java keystore files

Project description

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

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

pytruststore-0.1.1.tar.gz (196.2 kB view details)

Uploaded Source

Built Distribution

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

pytruststore-0.1.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file pytruststore-0.1.1.tar.gz.

File metadata

  • Download URL: pytruststore-0.1.1.tar.gz
  • Upload date:
  • Size: 196.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pytruststore-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e9a63d09636ba44b80f1b55dda5f8269805e4cc89119ec414ddb570e9ac983fa
MD5 5d64a73f6a7a666d4dbc10df3acc6d25
BLAKE2b-256 241ab8eec38ba5845e4351fe72611499e187495e857406087f993eb5400a747d

See more details on using hashes here.

File details

Details for the file pytruststore-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pytruststore-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pytruststore-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3a8c2c4adfebe79fb5ccb2ce497aeac4f2e774e483bc0a37e2ee6b8183f72dc
MD5 82d414dafb3b2ae9e979a5470e2fb793
BLAKE2b-256 28bdf6a7337abdc78b3636ab81b4d6a80b74580cea9c0ef9328cedb2d589edd2

See more details on using hashes here.

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