Skip to main content

silver-nitrate

This is a collection of Python utilities used by the Flickr Foundation. It allows us to share certain functions and common code across all our projects.

Think of it as a souped-up version of utils.py.

This library is primarily for our use, but the code is fairly generic and may well be useful in other projects. If you want to use it, copy/paste the code (and the associated tests!) into your own project rather than adding a dependency on this library.

Builder's Photo of 2-8-0 Locomotive No 1402 "James Archbald," built in 1930 by the Delaware & Hudson Railroad. Scan of a silver-halide photo print. Photo from Bill Harrison on Flickr.

What's in this library?

This library contains shared functions that are a bit too complicated to copy/paste between different projects.

  • nitrate.cassettes -- pytest fixtures for working with vcrpy to record HTTP requests.
  • nitrate.flickr_login -- deal with the parts of the Flickr OAuth login process that are the same for every app.
  • nitrate.json -- encode/decode JSON in a type-preserving way.
  • nitrate.mock_passwords -- a pytest fixture to mock the keyring module.
  • nitrate.types -- helpers for validating Python types at runtime.
  • nitrate.xml -- type-safe helpers for finding matching elements or text in an XML document.

Why did you pick this name?

We wanted to pick a name that was:

  1. More interesting than "utils"
  2. Had a connection to photography
  3. Wasn't taken on PyPI

Silver nitrate was a key chemical in the early days of photography, especially in the 19th and early 20th centuries.

Photographers would coat glass plates with a mixture of chemicals, including silver nitrate. Because silver nitrate reacts when exposed to light, when you put the plate in a camera and open the shutter, different areas would react differently to create an image on the plate. You could then develop this plate into a photograph.

This code is key to our work at the Flickr Foundation, so it's a fitting name.

Development

If you want to make changes to the library, there are instructions in CONTRIBUTING.md.

License

This project is dual-licensed as Apache-2.0 and MIT.

Metadata

Release files for silver-nitrate 1.8.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 silver-nitrate 1.8.2
File Size Uploaded Provenance Actions
silver_nitrate-1.8.2.tar.gz 21.5 kB Without provenance Details for silver_nitrate-1.8.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for silver-nitrate 1.8.2
File Interpreter ABI Platform Actions
silver_nitrate-1.8.2-py3-none-any.whl Python 3 none any Details for silver_nitrate-1.8.2-py3-none-any.whl

Total release size: 38.5 kB

Release files / silver_nitrate-1.8.2.tar.gz

Download URL silver_nitrate-1.8.2.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7ca895e9dea12ce3f6c689e8269bb9a8791956f49eddac6303e645bb9330b939
BLAKE2b-256 checksum
How to use checksums
6705d25af161146f97cf843ea49718eb6e549923d89b32ffd0e9d80cf7e7d193
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release files / silver_nitrate-1.8.2-py3-none-any.whl

Download URL silver_nitrate-1.8.2-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c38ab92764c04399247aa0b1d5304c57edf4c5b78dfa0b88ef39dce9583ffdb
BLAKE2b-256 checksum
How to use checksums
1d3a894fbddcfab3e23979c70ffd80893d33e10284521f5a91e7f6874a2b8bd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Security for silver-nitrate 1.8.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