Skip to main content

SecLM library

This library provides convenient access to pin an SSL certificate to a specific pubkey.

Installation

pip install seclm

Usage

Here are some examples of using it in different libraries.

# specify url and sha256
from seclm.ssl import create_ssl_context
ssl_context = create_ssl_context("https://example.seclm.com", "9e69296bf68815839e2cf5c324318f304ba8a7de2f587245c0cb75f54e3fe196")

# httpx
import httpx
httpx.get("https://example.seclm.com", verify=ssl_context)

# aiohttp
import asyncio
import aiohttp
async def main():
    async with aiohttp.ClientSession() as session:
        async with session.get("https://example.seclm.com", ssl=ssl_context) as response:
            await response.text()
asyncio.run(main())

# openai
from openai import OpenAI, DefaultHttpxClient
client = OpenAI(
    api_key="EMPTY",
    base_url="https://example.seclm.com/v1",
    http_client=DefaultHttpxClient(verify=ssl_context)
)
chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Say this is a test",
        }
    ],
    model="meta-llama/Meta-Llama-3-8B-Instruct",
)

Metadata

Release files for seclm 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 seclm 0.1.1
File Size Uploaded Provenance Actions
seclm-0.1.1.tar.gz 2.2 kB Without provenance Details for seclm-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 4.8 kB

Release files / seclm-0.1.1.tar.gz

Download URL seclm-0.1.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c174f20ca8ae6b3a982f908244fb5e682cfd0cfe0ed47ae28cd5fbb42c4a2d55
BLAKE2b-256 checksum
How to use checksums
b6392b1ff6c846b2eaa5be53f1aead05a2c55b0065a9a3bf5f6e0439ed37826b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

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

Download URL seclm-0.1.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4f251080150a36ebf40cc6dd8ec298afcd5d3fe8f1ca619714a5f33e0dcdb89
BLAKE2b-256 checksum
How to use checksums
1ba41ae6fc33ead291c1b6b54f4d6b125c16c946ccc48168ebb406e4c822b4cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Security for seclm 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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