Skip to main content

Biscuits

Low level API for handling cookies server side.

Install

pip install biscuits

API

# Parse a "Cookie:" header value:
from biscuits import parse
parse('some=value; and=more')
> {'some': 'value', 'and': 'more'}

# Generate a "Set-Cookie:" header value:
from biscuits import Cookie
cookie = Cookie(name='foo', value='bar', domain='www.example.org')
str(cookie)
> "foo=bar; Domain=www.example.org; Path=/"

Building from source

pip install cython
make compile
python setup.py develop

Testing

make test

Benchmark

benchmark

See Benchmark for more details.

Changelog

0.2

  • unescape antislash when parsing to be consistent with quoting (cf #3)
  • unescape octal ascii when parsing to be consistent with quoting (cf #4)

0.3

  • add support for the SameSite attribute (cf #8)

Metadata

Release files for biscuits 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biscuits 0.3.2
File Size Uploaded Provenance Actions
biscuits-0.3.2.tar.gz 92.8 kB Without provenance Details for biscuits-0.3.2.tar.gz

Release files / biscuits-0.3.2.tar.gz

Download URL biscuits-0.3.2.tar.gz
Size 92.8 kB
Tags Source
SHA-256 checksum
How to use checksums
041ee6da5af6b0f1eb327a8b5d73930eddc5d9d8b3daf7fbe00301564abd9510
BLAKE2b-256 checksum
How to use checksums
73f5894078ebebfea9b022bdfa0f0079cc570b5731ff42931ddaf57216d5ac54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.7

Security for biscuits 0.3.2

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