py-connect-test
A simple Python package to test HTTP connectivity to URLs and retrieve status codes. Built with Typer CLI framework and httpx.
Prerequisites
- Python 3.14 or higher
- Poetry (for dependency management)
Installation
From PyPI
pip install py-connect-test
...
From Source
git clone https://github.com/tech1ndex/py-connect-test.git
cd py-connect-test
poetry install
Usage
Basic Usage
Test connectivity to the default URL (https://ifconfig.me):
py-connect-test test
Options
Bypass SSL Certificate Validation
py-connect-test test --insecure
# or
py-connect-test test -i
Send Alerts to Webhook
py-connect-test test --alerts
# or
py-connect-test test -a
Combined Options
py-connect-test test --insecure --alerts
View Help
py-connect-test test --help
Docker Usage
Build Image
docker build -t py-connect-test:latest .
Run Container
docker run -d \
-e HTTP_URL=https://example.com \
-e WEBHOOK_URL=http://prometheus.local \
ghcr.io/tech1ndex/py-connect-test:latest
Bypass SSL Validation
docker run -d \
-e PY_CONNECT_TEST_URL=https://example.com \
ghcr.io/tech1ndex/py-connect-test:latest \
py-connect-test test --insecure
Multi-Architecture Support
Available architectures:
amd64arm64
Pull specific architecture:
docker pull ghcr.io/tech1ndex/py-connect-test:latest-amd64
docker pull ghcr.io/tech1ndex/py-connect-test:latest-arm64
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
PY_CONNECT_TEST_URL |
URL to test connectivity to | https://ifconfig.me |
No |
WEBHOOK_URL |
Webhook URL for alerts | http://prometheus.local |
No |
PAYLOAD_FILE_PATH |
Path to JSON payload file for webhooks | /tmp/payload.json |
No |
Project Structure
py-connect-test/
├── src/py_connect_test/
│ ├── main.py # CLI entry point
│ ├── settings.py # Configuration management
│ ├── setup_logger.py # Logger setup
│ ├── py.typed # Type hints marker
│ └── services/
│ └── http.py # HTTP service
├── tests/
│ ├── conftest.py # Pytest fixtures
│ └── services/
│ └── test_http_service.py # HTTP service tests
├── pyproject.toml # Project configuration
├── Dockerfile # Docker configuration
└── README.md
Metadata
Release files for py-connect-test 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_connect_test-2.2.1.tar.gz | 5.0 kB | With provenance | Details for py_connect_test-2.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_connect_test-2.2.1-py3-none-any.whl | Python 3 | none | any | Details for py_connect_test-2.2.1-py3-none-any.whl |
Total release size: 10.1 kB
Release files / py_connect_test-2.2.1.tar.gz
| Download URL | py_connect_test-2.2.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae28664b5632f302321ce87152496a73dcf2e11ab258d22f90147963b92c1a3e
|
|
BLAKE2b-256 checksum How to use checksums |
31b26968aca8741e2a566a5cc915be0bf0d73144f7e4fd58c080a4335091768d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logRelease files / py_connect_test-2.2.1-py3-none-any.whl
| Download URL | py_connect_test-2.2.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ebd7c997710e511612598bed08d8562ae2731623c769e5960e0b81a1e3f70ba
|
|
BLAKE2b-256 checksum How to use checksums |
13ec07f24cc5a0991f9d55802e8fe96bc9ed2dbe427b685d2288b5c7b7d46353
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logSecurity for py-connect-test 2.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for py_connect_test-2.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.