Skip to main content

Add your description here

Project description

Mac gurl

This project provides an HTTPAdapter for requests. The adapter will leverage Apple's Foundation and Security framework to perform the HTTP requests. The Python bindings are provided by the PyObjC project. This project is based on gurl.py of the Munki project.

Important Notes

  • Currently only GET requests are supported.

Usage

import requests
from mac_gurl.requests  import MacHTTPAdapter

s = requests.Session()
s.mount("https:", MacHTTPAdapter())
s.get("YOUR_URL")

Details on the HTTPAdapter are described in the docs of requests.

Run an example script

TODO this needs to be updated

PYTHONPATH=. uv run example/example.py

# or by sourcing the venv
. .venv/bin/activate
PYTHONPATH=. python example/example.py

Development

Setup Environment

This project uses uv to manage dependencies and virtual environments.

uv sync
# activate the virtual environment
. .venv/bin/activate

# check code
ruff check

# format code
ruff format

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

mac_gurl-0.1.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

mac_gurl-0.1.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mac_gurl-0.1.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mac_gurl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 492dad4bf6e5240078089cf43471ca188c52630d8deba68e4230b89ea171df91
MD5 0bb61cf28d11d3b83ab0f6007cdabfe3
BLAKE2b-256 f9a7f8242bb21f0b8d50e31c0a1622049e4a4aad291f78ab37b8bef05235d25f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mac_gurl-0.1.1.tar.gz:

Publisher: build-and-publish.yaml on toanju/mac-gurl

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

File details

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

File metadata

  • Download URL: mac_gurl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mac_gurl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 723e1f4c0403dd14c1e96c38b174870cf548e5f5cc82b656fdb2ae8231d68507
MD5 126f4c275eeeb9de949e1f03c2ba56ad
BLAKE2b-256 c11e0d1dbb2c276f0c13a5475c3b839bb864d6f3a09ddd22df3217c8f14589ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for mac_gurl-0.1.1-py3-none-any.whl:

Publisher: build-and-publish.yaml on toanju/mac-gurl

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