Python utilities used by the Flickr Foundation
Project description
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.
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:
- More interesting than "utils"
- Had a connection to photography
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file silver_nitrate-1.8.1.tar.gz.
File metadata
- Download URL: silver_nitrate-1.8.1.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69b3cb0858df3c89006130725c8084c0656e71f32c076d58bcfe5d1d26c940c9
|
|
| MD5 |
af56b969dda09a9efbf3997b2c4630d5
|
|
| BLAKE2b-256 |
33dfba6885eaebb0cad31e746ae615586f3425897de9fb8f28e049e9605fc68e
|
File details
Details for the file silver_nitrate-1.8.1-py3-none-any.whl.
File metadata
- Download URL: silver_nitrate-1.8.1-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47629f216691c0c694958b825def9ba2a4f7eeace5628cbecc3ea9621954832b
|
|
| MD5 |
74554485f3e17c476e57fd86f9623839
|
|
| BLAKE2b-256 |
b13669839ba6435333052404c6963839c467a6362d727bd8d5f69429c08fd3c1
|