Skip to main content

Dynamic HTTP client from httpx

Project description

Http Dynamix

Ruff Code Quality Badge Documentation Built by Sphinx Project Built with Hatchling

Library for creating dynamic HTTP requests in puthon

Quick Start

This guide helps you get started with Http Dynamix.

Prerequisites

  • Docker installed and running

Basic Setup with Docker Compose (Recommended)

  1. Create test directory:
mkdir -p test-api-service/tests && cd test-api-service
  1. create pytest configuration file pytest.ini in the tests directory:

../examples/tests/pytest.ini

  1. Create pytest test cases in `tests/test_httpbin_org_service.py`:

../examples/tests/test_httpbin_org_service.py

  1. Create compose.yaml:

../examples/compose.yaml

  1. Run all tests in parallel:
docker compose up --build
  1. To run only specified tests, override the command in compose.yaml:
command: ["pytest", "-n", "auto", "tests/test_httpbin_org_service.py"]

This uses pytest-xdist for parallel execution.

Contributing

We welcome contributions to Http Dynamix! There are many ways to contribute, from improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into the main project itself.

Local Development Installation

For developers or contributors:

# Install mamba-githook for creation of isolated virtual environment, 
# Choose the correct installer for your platform
# Supported: linux-amd64, linux-arm64, windows-amd64, windows-arm64
curl -L https://github.com/aydabd/mamba-githook/releases/download/1.0.1/mamba-githook-installer-linux-arm64 \
    -o mamba-githook-installer && \
    chmod +x mamba-githook-installer && \
    ./mamba-githook-installer install

# Install micromamba via mamba-githook
mamnba-githook install-micromamba
# Activate permanent micromamba in your shell, Then you need to restart your shell
mamba-githook init-shell

# Create virtual environment via micromamba
micromamba create -n http-dynamix-env hatch pandoc

# Activate virtual environment
micromamba activate http-dynamix-env

# Clone repository
git clone ssh://git@github.com:aydabd/http-dynamix.git
cd http-dynamix

# Install development dependencies
# This will install all dependencies from pyproject.toml
hatch env create

# Run hatch for pre-release:all environment
hatch run pre-release:all

# Install the package in editable mode inside the micromamba environment
pip install -e .

# Build documentation in HTML format
hatch run pre-release:docs-html

Docker/Compose Test Execution

You can run all tests in parallel using Docker Compose:

docker compose up --build

To run only integration tests, override the command in compose.yaml:

command: ["pytest", "-n", "auto", "tests/test_clients_integration.py"]

This uses pytest-xdist for parallel execution. The Dockerfile and compose.yaml are set up for both CI and local testing.

Publish Documentation To Confluence

To publish the documentation to Confluence, you need to virtualenv python and installed hatch. Then you need to set the following environment variables into .env file:

CONFLUENCE_SERVER_USER=<your_confluence_user-at-server>
CONFLUENCE_API_TOKEN=<your-api-token-for-confluence>

After that, you can run the following command to publish the documentation to Confluence:

# Publish the documentation to Confluence
hatch run release:all

[!NOTE] Ensure your project is released with the version number before publishing the documentation to Confluence.

You can find the published documentation at the link provided in the output of the command.

For more information about documentation publishing, check the pyproject.toml file and docs/conf.py file.

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

http_dynamix-1.0.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

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

http_dynamix-1.0.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file http_dynamix-1.0.0.tar.gz.

File metadata

  • Download URL: http_dynamix-1.0.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for http_dynamix-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4cfbe05154ae1c269f75cd6e3f5da6b012bf5114fe9a07a6fbbce1af68ec760a
MD5 2bde474513dedcd7b833a6463a643761
BLAKE2b-256 2972d13cd5b9d282804b88440484027c050c3c6a853bf27829c7639570c6792d

See more details on using hashes here.

Provenance

The following attestation bundles were made for http_dynamix-1.0.0.tar.gz:

Publisher: pypi-release.yml on aydabd/http-dynamix

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

File details

Details for the file http_dynamix-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: http_dynamix-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for http_dynamix-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0df73ab45e496119052f0837ba17ca2372dd65f7be715857f1edf45636a3c1
MD5 8990b5ba94325822aed43cb3ec15e85f
BLAKE2b-256 bd45ee47689e3ca9ca7be451ae6e0f7d904a7d146d6dba2612e6a9e4990a3538

See more details on using hashes here.

Provenance

The following attestation bundles were made for http_dynamix-1.0.0-py3-none-any.whl:

Publisher: pypi-release.yml on aydabd/http-dynamix

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