This Python library provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. The specification is fully compatible with the original RFC 7049. Among its features are:
Simple API like the
json
orpickle
modules.Support many CBOR tags with stdlib objects.
Generic tag decoding.
Shared value references including cyclic references.
String references compact encoding with repeated strings replaced with indices.
Optional C module backend tested on big- and little-endian architectures.
Extensible tagged value handling using tag_hook and object_hook on decode and default on encode.
POPPY is a Python package that simulates physical optical propagation including diffraction. It implements a flexible framework for modeling Fraunhofer and Fresnel diffraction and point spread function formation, particularly in the context of astronomical telescopes.
POPPY was developed as part of a simulation package for the James Webb Space Telescope, but is more broadly applicable to many kinds of imaging simulations. It is not, however, a substitute for high fidelity optical design software such as Zemax or Code V, but rather is intended as a lightweight alternative for cases for which diffractive rather than geometric optics is the topic of interest, and which require portability between platforms or ease of scripting.
funcy
is a library that provides functional tools. Examples are:
merge - Merges collections of the same type
walk - Type-preserving map
select - Selects a part of a collection
take - Takes the first n items of a collection
first - Takes the first item of a collection
remove - Predicated-removes items of a collection
concat - Concatenates two collections
flatten - Flattens a collection with subcollections
distinct - Returns only distinct items
split - Predicated-splits a collection
split_at - Splits a collection at a given item
group_by - Groups items by group
pairwise - Pairs off adjacent items
partial - Partially-applies a function
curry - Curries a function
compose - Composes functions
complement - Complements a predicate
all_fn - "all" with predicate
The PyPNG module implements support for PNG images. It reads and writes PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA, LA (greyscale with alpha) with 8/16 bits per channel; colour mapped images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing. A number of optional chunks can be specified (when writing) and understood (when reading): tRNS, bKGD, gAMA.
PyPNG is not a high level toolkit for image processing (like PIL) and does not aim at being a replacement or competitor. Its strength lies in fine-grained extensive support of PNG features. It can also read and write Netpbm PAM files, with a focus on its use as an intermediate format for implementing custom PNG processing.
Ginga is a toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel data in numpy arrays. It can view astronomical data such as contained in files based on the FITS (Flexible Image Transport System) file format. It is written and is maintained by software engineers at the National Astronomical Observatory of Japan (NAOJ), the Space Telescope Science Institute (STScI), and other contributing entities.
The Ginga toolkit centers around an image display object which supports zooming and panning, color and intensity mapping, a choice of several automatic cut levels algorithms and canvases for plotting scalable geometric forms. In addition to this widget, a general purpose "reference" FITS viewer is provided, based on a plugin framework. A fairly complete set of standard plugins are provided for features that we expect from a modern FITS viewer: panning and zooming windows, star catalog access, cuts, star pick/FWHM, thumbnails, etc.
Ginga is a toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel data in numpy arrays. It can view astronomical data such as contained in files based on the FITS (Flexible Image Transport System) file format. It is written and is maintained by software engineers at the National Astronomical Observatory of Japan (NAOJ), the Space Telescope Science Institute (STScI), and other contributing entities.
The Ginga toolkit centers around an image display object which supports zooming and panning, color and intensity mapping, a choice of several automatic cut levels algorithms and canvases for plotting scalable geometric forms. In addition to this widget, a general purpose "reference" FITS viewer is provided, based on a plugin framework. A fairly complete set of standard plugins are provided for features that we expect from a modern FITS viewer: panning and zooming windows, star catalog access, cuts, star pick/FWHM, thumbnails, etc.
HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.
HTTPX builds on the well-established usability of requests, and gives you:
A broadly requests-compatible API.
Standard synchronous interface, but with async support if you need it.
HTTP/1.1 and HTTP/2 support.
Ability to make requests directly to WSGI applications or ASGI applications.
Strict timeouts everywhere.
Fully type annotated.
99% test coverage.
Plus all the standard features of requests:
International Domains and URLs
Keep-Alive & Connection Pooling
Sessions with Cookie Persistence
Browser-style SSL Verification
Basic/Digest Authentication
Elegant Key/Value Cookies
Automatic Decompression
Automatic Content Decoding
Unicode Response Bodies
Multipart File Uploads
HTTP(S) Proxy Support
Connection Timeouts
Streaming Downloads
.netrc Support
Chunked Requests
PyFIM is an extension module that makes several frequent item set mining implementations available as functions in Python 2.7.x & 3.8.x. Currently apriori, eclat, fpgrowth, sam, relim, carpenter, ista, accretion and apriacc are available as functions, although the interfaces do not offer all of the options of the command line program. (Note that lcm
is available as an algorithm mode of eclat
). There is also a "generic" function fim
, which is essentially the same function as fpgrowth
, only with a simplified interface (fewer options).
Finally, there is a function arules
for generating association rules (simplified interface compared to apriori
, eclat
and fpgrowth
, which can also be used to generate association rules.
APLpy is a Python module aimed at producing publication-quality plots of astronomical imaging data in FITS format. The module uses matplotlib
, a powerful and interactive plotting package. It is capable of creating output files in several graphical formats, including EPS, PDF, PS, PNG, and SVG.
Main features:
Make plots interactively or using scripts
Show grayscale, colorscale, and 3-color RGB images of FITS files
Generate co-aligned FITS cubes to make 3-color RGB images
Make plots from FITS files with arbitrary WCS (e.g. position-velocity)
Slice multi-dimensional FITS cubes
Overlay any number of contour sets
Overlay markers with fully customizable symbols
Plot customizable shapes like circles, ellipses, and rectangles
Overlay ds9 region files
Overlay coordinate grids
Show colorbars, scalebars, and beams
Customize the appearance of labels and ticks
Hide, show, and remove different contour and marker layers
Pan, zoom, and save any view as a full publication-quality plot
Save plots as EPS, PDF, PS, PNG, and SVG
VCR.py simplifies and speeds up tests that make HTTP requests. The first time you run code that is inside a VCR.py context manager or decorated function, VCR.py records all HTTP interactions that take place through the libraries it supports and serializes and writes them to a flat file (in yaml format by default). This flat file is called a cassette. When the relevant piece of code is executed again, VCR.py will read the serialized requests and responses from the aforementioned cassette file, and intercept any HTTP requests that it recognizes from the original test run and return the responses that corresponded to those requests. This means that the requests will not actually result in HTTP traffic, which confers several benefits including:
The ability to work offline
Completely deterministic tests
Increased test execution speed
If the server you are testing against ever changes its API, all you need to do is delete your existing cassette files, and run your tests again. VCR.py will detect the absence of a cassette file and once again record all HTTP interactions, which will update them to correspond to the new API.
The Adobe Font Development Kit for OpenType (AFDKO) is a set of tools for building OpenType font (OTF) files from PostScript and TrueType font data. It includes the following commands:
buildcff2vf
Assemble a CFF2 variable font from a .designspace file.
buildmasterotfs
Build master source OpenType/CFF fonts from a
.designspace
file and UFO master source fonts.charplot
dtdigiplotdtfontplotdtfontsetplotdthintplotdtwaterfallplotAliases for the corresponding options of the
proofpdf
command.checkoutlinesufo
Perform outline quality checks. It can also remove path overlaps.
comparefamily
Look in a specific directory, examine and report on all the OpenType fonts found.
type1
dtdetype1Compile and decompile, respectively, a Type 1 font to and from a plain-text representation.
makeinstancesufo
Generate UFO font instances from a set of master UFO fonts.
makeotfexe
Read all the font data and build the final OpenType font.
makeotf
This command can be used to prepare the input files needed by
makeotfexe
.mergefonts
Merge one or more fonts into a parent font.
otc2otf
Extract all OpenType fonts from the parent OpenType Collection font.
otf2otc
Build an OpenType Collection font file from two or more OpenType font files.
otf2ttf
Converts OpenType-CFF fonts to TrueType.
rotatefont
Apply a Postscript transform matrix to the source font files.
sfntdiff
Low-level comparison of two OpenType font files.
sfntedit
Support table-editing, listing, and checksumming options on sfnt-formatted files such as OpenType Format (OTF) or TrueType.
spot
Dump sfnt data from plain files or Macintosh resource files.
ttfcomponentizer
Take in a TrueType font and look for a UFO font stored in the same directory. Use the UFO's components data to compose matching TrueType glyphs.
ttfdecomponentizer
Take in a TrueType font and decompose any composite glyphs into simple glyphs.
ttxn
Make a normalized dump of the font, or of selected tables.
tx
The
tx
(Type eXchange) is a test harness for the CoreType libraries but also provides many useful font conversion and analysis facilities.
The Adobe Font Development Kit for OpenType (AFDKO) is a set of tools for building OpenType font (OTF) files from PostScript and TrueType font data. It includes the following commands:
buildcff2vf
Assemble a CFF2 variable font from a .designspace file.
buildmasterotfs
Build master source OpenType/CFF fonts from a
.designspace
file and UFO master source fonts.charplot
dtdigiplotdtfontplotdtfontsetplotdthintplotdtwaterfallplotAliases for the corresponding options of the
proofpdf
command.checkoutlinesufo
Perform outline quality checks. It can also remove path overlaps.
comparefamily
Look in a specific directory, examine and report on all the OpenType fonts found.
type1
dtdetype1Compile and decompile, respectively, a Type 1 font to and from a plain-text representation.
makeinstancesufo
Generate UFO font instances from a set of master UFO fonts.
makeotfexe
Read all the font data and build the final OpenType font.
makeotf
This command can be used to prepare the input files needed by
makeotfexe
.mergefonts
Merge one or more fonts into a parent font.
otc2otf
Extract all OpenType fonts from the parent OpenType Collection font.
otf2otc
Build an OpenType Collection font file from two or more OpenType font files.
otf2ttf
Converts OpenType-CFF fonts to TrueType.
rotatefont
Apply a Postscript transform matrix to the source font files.
sfntdiff
Low-level comparison of two OpenType font files.
sfntedit
Support table-editing, listing, and checksumming options on sfnt-formatted files such as OpenType Format (OTF) or TrueType.
spot
Dump sfnt data from plain files or Macintosh resource files.
ttfcomponentizer
Take in a TrueType font and look for a UFO font stored in the same directory. Use the UFO's components data to compose matching TrueType glyphs.
ttfdecomponentizer
Take in a TrueType font and decompose any composite glyphs into simple glyphs.
ttxn
Make a normalized dump of the font, or of selected tables.
tx
The
tx
(Type eXchange) is a test harness for the CoreType libraries but also provides many useful font conversion and analysis facilities.
.
Yet another LaTeX filter
Portable archive file manager.
Simple python varint implementation
Non-Metric Space Library (NMSLIB)
Simple immutable types for python.
Python logging made (stupidly) simple
Export data as binary VTK files
Snuggs are S-expressions for Numpy.
This package provides optimized PyTree
utilities.
This package provides type hints for Python.
This package provides a python ShEx Implementation.