The ItemAdapter class is a wrapper for data container objects, providing a common interface to handle objects of different types in an uniform manner, regardless of their underlying implementation.
Currently supported types are:
scrapy.item.Item
dict
dataclass-based classes
attrs-based classes
pydantic-based classes
Additionally, interaction with arbitrary types is supported by implementing a pre-defined interface.
PickleShare is a small ‘shelve’-like datastore with concurrency support. Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, many processes can access the database simultaneously. Changing a value in database is immediately visible to other processes accessing the same database. Concurrency is possible because the values are stored in separate files. Hence the “database” is a directory where all files are governed by PickleShare.
Macaroons, like cookies, are a form of bearer credential. Unlike opaque tokens, macaroons embed caveats that define specific authorization requirements for the target service, the service that issued the root macaroon and which is capable of verifying the integrity of macaroons it receives.
Macaroons allow for delegation and attenuation of authorization. They are simple and fast to verify, and decouple authorization policy from the enforcement of that policy.
Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl. As a fixtures replacement tool, it aims to replace static, hard to maintain fixtures with easy-to-use factories for complex object. Instead of building an exhaustive test setup with every possible combination of corner cases, factory_boy allows you to use objects customized for the current test, while only declaring the test-specific fields.
This Python package provides high-level utilities to read and write a variety of Python types from and to HDF5 formatted files. This package also provides support for MATLAB MAT v7.3 formatted files, which are HDF5 files with a different extension and some extra metadata. Because HDF5 and MAT files might need to be read from untrusted sources, pickling is avoided in this package.
This is a implementation of immutable linked lists for Python. It contains nil (the empty linked list) and a Pair class for nodes. Since a linked list is treated as immutable, it is hashable, and its length can be retrieved in constant time. Some of the terminology is inspired by LISP. It is possible to create an improper list by creating a Pair with a non-list cdr.
Table logger using Rich, aimed at PyTorch Lightning logging.
Features
display your training logs with pretty rich tables
describe your fields with goal, format and name
a field descriptor can be matched with any regex
a field name can be computed as a regex substitution
works in Jupyter notebooks as well as in a command line
integrates easily with Pytorch Lightning
The fastbencode Python package implements the bencode serialization format for storing and transmitting loosely structured data, originally used by BitTorrent.
The format can encode four different types of values: byte strings, integers, lists, and dictionaries (associative arrays). It's simple and unaffected by endianness,
This package includes both a pure-Python version and an optional C extension based on Cython. Both provide the same functionality, but the C version has significantly better performance.
FFCx is a compiler for finite element variational forms.
From a high-level description of the form in the UFL, it generates efficient low-level C code that can be used to assemble the corresponding discrete operator (tensor). In particular, a bilinear form may be assembled into a matrix and a linear form may be assembled into a vector.
This package provides the CLI and Python library.
pytest-perf makes it easy to compare works by creating two installs, the control and the experiment, and measuring the performance of some Python code against each. Under the hood, it uses the pip-run command to install from the upstream main branch (e.g. https://github.com/jaraco/pytest-perf) for the control and from . for the experiment. It then runs each of the experiments against each of the environments.
This package provides:
PEP 561 typing stubs packages for the Trio project packages:
trio (
trio-stubs)outcome (
outcome-stubs)async_generator (
async_generator-stubs)
A package
trio_typingcontaining types that Trio programs often want to refer to (AsyncGenerator[Y, S]andTaskStatus[T])and a mypy plugin that smooths over some limitations in the basic type hints.
Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically.
You can add new jobs or remove old ones on the fly as you please. If you store your jobs in a database, they will also survive scheduler restarts and maintain their state. When the scheduler is restarted, it will then run all the jobs it should have run while it was offline.
Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically.
You can add new jobs or remove old ones on the fly as you please. If you store your jobs in a database, they will also survive scheduler restarts and maintain their state. When the scheduler is restarted, it will then run all the jobs it should have run while it was offline.
Blockbuster is a Python package designed to detect and prevent blocking calls within an asynchronous event loop. It is particularly useful when executing tests to ensure that your asynchronous code does not inadvertently call blocking operations, which can lead to performance bottlenecks and unpredictable behavior.
It does this by wrapping common blocking functions and raising an exception when they are called within an asynchronous context. Note that Blockbuster currently only detects asyncio event loops and is tested only with CPython.
The FInite element Automatic Tabulator (FIAT) supports generation of arbitrary order instances of the Lagrange elements on lines, triangles, and tetrahedra. It is also capable of generating arbitrary order instances of Jacobi-type quadrature rules on the same element shapes. Further, H(div) and H(curl) conforming finite element spaces such as the families of Raviart-Thomas, Brezzi-Douglas-Marini and Nedelec are supported on triangles and tetrahedra. Upcoming versions will also support Hermite and nonconforming elements.
FIAT is part of the FEniCS Project.
PyWavefront reads Wavefront 3D object files (something.obj, something.obj.gz and something.mtl) and generates interleaved vertex data for each material ready for rendering.
A simple (optional) visualization module is also provided for rendering the object(s). The interleaved data can also be used by more modern renderers thought VBOs or VAOs.
Currently the most commonly used features in the specification has been implemented:
positions;
texture coordinates;
normals;
vertex color;
material parsing;
texture and texture parameters.
This package provides Numba-accelerated implementations of common SciPy probability distributions and others used in particle physics.
The supported distributions are:
Uniform
(Truncated) Normal
Log-normal
Poisson
Binomial
(Truncated) Exponential
Student's t
Voigtian
Crystal Ball
Generalised double-sided Crystal Ball
Tsallis-Hagedorn, a model for the minimum bias pT distribution
Q-Gaussian
Bernstein density (not normalized to unity)
Cruijff density (not normalized to unity)
CMS-Shape
Generalized Argus
The pyjson-tricks package brings several pieces of functionality to python handling of JSON files:
Store and load numpy arrays in human-readable format.
Store and load class instances both generic and customized.
Store and load date/times as a dictionary (including timezone).
Preserve map order using OrderedDict.
Allow for comments in json files by starting lines with #.
Sets, complex numbers, Decimal, Fraction, enums, compression, duplicate keys, pathlib Paths, bytes, ...
As well as compression and disallowing duplicate keys.
openPMD is an open meta-data schema that provides meaning and self-description for data sets in science and engineering. See the openPMD standard for details of this schema.
This library provides a reference API for openPMD data handling. Since openPMD is a schema (or markup) on top of portable, hierarchical file formats, this library implements various backends such as HDF5, ADIOS2 and JSON. Writing & reading through those backends and their associated files are supported for serial and MPI-parallel workflows.
OpenStack Object Storage (code-named Swift) creates redundant, scalable object storage using clusters of standardized servers to store petabytes of accessible data. It is not a file system or real-time data storage system, but rather a long-term storage system for a more permanent type of static data that can be retrieved, leveraged, and then updated if necessary. Primary examples of data that best fit this type of storage model are virtual machine images, photo storage, email storage and backup archiving. Having no central "brain" or master point of control provides greater scalability, redundancy and permanence.
madrigalWeb is a pure python module to access data from any Madrigal database.
Madrigal is an upper atmospheric science database used by groups throughout the world. Madrigal is a robust, World Wide Web based system capable of managing and serving archival and real-time data, in a variety of formats, from a wide range of upper atmospheric science instruments. Data at each Madrigal site is locally controlled and can be updated at any time, but shared metadata between Madrigal sites allow searching of all Madrigal sites at once from any Madrigal site.
madrigalWeb is a pure python module to access data from any Madrigal database.
Madrigal is an upper atmospheric science database used by groups throughout the world. Madrigal is a robust, World Wide Web based system capable of managing and serving archival and real-time data, in a variety of formats, from a wide range of upper atmospheric science instruments. Data at each Madrigal site is locally controlled and can be updated at any time, but shared metadata between Madrigal sites allow searching of all Madrigal sites at once from any Madrigal site.
benfordslaw is Python package to test if an empirical (observed) distribution differs significantly from a theoretical (expected, Benfords) distribution. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. This method can be used if you want to test whether your set of numbers may be artificial (or manipulated). If a certain set of values follows Benford’s Law then model’s for the corresponding predicted values should also follow Benford’s Law. Normal data (unmanipulated) does trend with Benford’s Law, whereas manipulated or fraudulent data does not.
This package provides a collection of astronomy related tools for Python.
The following subpackages are available:
funcFit: A convenient fitting package providing support for minimization and MCMC sampling.
modelSuite: A Set of astrophysical models (e.g., transit light-curve modeling), which can be used stand-alone or with funcFit.
AstroLib: A set of useful routines including a number of ports from IDL's astrolib.
Constants: The package provides a number of often-needed constants.
Timing: Provides algorithms for timing analysis such as the Lomb-Scargle and the Generalized Lomb-Scargle periodogram
pyaGUI: A collection of GUI tools for interactive work.