Skip to main content

BSSL project integration with existing http clients

Project description

BSSL Integrations

Made in Ukraine license pypi python versions CI uv

BSSL project integration with existing http clients

Supported projects

Installation

Project is available on PyPI (now in prerelease stage, so you need to allow prerelease installation).

pip install --pre bssl-integrations
poetry add --allow-prereleases bssl-integrations
uv add --prerelease if-necessary bssl-integrations  # explicitly allow prelease

❗Note that the HTTP client libraries must be installed separately.

Usage

Aiohttp

Module expose BSSLConnector class, which is a subclass of aiohttp.TCPConnector with bssl context.

import aiohttp
import bssl
from bssl_integrations.aiohttp import BSSLConnector

my_tls_config = bssl.TLSClientConfiguration(...)

connector = BSSLConnector(my_tls_config)
session = aiohttp.ClientSession(connector=connector)

# do with session whatever you want

Aiohttp-socks

As aiohttp connector above, but with socks proxy support. See aiohttp-socks for more info.

import aiohttp
import bssl
from bssl_integrations.aiohttp_socks import BSSLProxyConnector

my_tls_config = bssl.TLSClientConfiguration(...)

connector = BSSLProxyConnector(
    host="127.0.0.1",
    port=1080,
    username="user",
    password="password",
    dest_tls_config=my_tls_config,
)
# OR
connector = BSSLProxyConnector.from_url("socks5://user:password@127.0.0.1:1080", dest_tls_config=my_tls_config)
session = aiohttp.ClientSession(connector=connector)

# do with session whatever you want

❗ Note that you need aiohttp-socks to be installed.

Httpx

import httpx
import bssl
from bssl_integrations.httpx import BSSLTransport

my_tls_config = bssl.TLSClientConfiguration(...)

transport = BSSLTransport(my_tls_config)
client = httpx.Client(transport=transport)

# do with client whatever you want

Credits

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

bssl_integrations-1.0.0a0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

bssl_integrations-1.0.0a0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file bssl_integrations-1.0.0a0.tar.gz.

File metadata

  • Download URL: bssl_integrations-1.0.0a0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bssl_integrations-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 4f224038cc07a932a3b81949a8ef8af46fdc8cd986e3a245bc2aba9d0ea13186
MD5 198f0b4883306f883e2aa3a4846daf3f
BLAKE2b-256 8657632836cf2721893a0caaa440dfe15835d53afade6a8eed109052710173f6

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on somespecialone/bssl-integrations

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

File details

Details for the file bssl_integrations-1.0.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for bssl_integrations-1.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed612ee019b86b66c73c25a4f110aad373d7f01a9b0c23b51c3f02606e88cdec
MD5 0714e19a47faea744273bbcd6aabcf8e
BLAKE2b-256 532a3398fb27f79e8c8a9ba519a5b314b5d67aeae913a64158e6bbeafc2914d0

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on somespecialone/bssl-integrations

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