Pyxides
Containers for the python sages 🏺✨📦
pyxides is a python library for working with array-like object containers.
The name "pyxides" is the plural form of the Greek word "pyxis" (πυξίς), the
name for the decorated cylindrical containers from
antiquity. The name felt
appropriate for a python library involving containers!
Install
pip install pyxides
Use
Basic usage
The containers module contains some ready-made container classes that can be
used directly:
from pyxides.containers import ArrayLike1D
a = ArrayLike1D([1, 2, 3])
# it has the usual list-like methods for editing, and expanding
three = a.pop(-1)
a.append(id)
a.extend(['some', 'other', object])
# multi-indexing works
a[[0, 3, 5]]
[1, <function id(obj, /)>, 'other']
Type Enforcement
To construct a container that only allows certain types of objects:
from pyxides.type_check import OfType
class Twinkie:
"""Yum!"""
class Box(list, OfType(Twinkie)):
"""So much YUM!"""
twinkies = Box()
twinkies.append(Twinkie()) # OK!
Object other than Twinkies, are not allowed in the container:
twinkies.append(0)
TypeError: Items in container class 'Box' must derive from <class '__main__.Twinkie'>. Item 1 is of type <class 'int'>.
Vectorization
TODO
Grouping containers
TODO
Contribute
Contributions are welcome!
- Fork it!
- Create your feature branch
git checkout -b feature/rad - Commit your changes
git commit -am 'Add some cool feature 😎' - Push to the branch
git push origin feature/rad - Create a new Pull Request
Contact
- e-mail: hannes@saao.ac.za
License
- see LICENSE
Metadata
Release files for pyxides 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyxides-0.3.0.tar.gz | 22.7 kB | Without provenance | Details for pyxides-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyxides-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyxides-0.3.0-py3-none-any.whl |
Total release size: 42.6 kB
Release files / pyxides-0.3.0.tar.gz
| Download URL | pyxides-0.3.0.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e9f4c67b1e4df9106a14291f83a4a6251c075e03826683708b4f516f6e6866d
|
|
BLAKE2b-256 checksum How to use checksums |
42665313c6a845736546bbf177dd889ecda78e99712bf3edf4ec1dd0870581b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / pyxides-0.3.0-py3-none-any.whl
| Download URL | pyxides-0.3.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9766fae3324d5454a84b126d108b9ad11990dfff6a3ee6272257743c3770d172
|
|
BLAKE2b-256 checksum How to use checksums |
b57018222b52642c221e5a56d3bdedd5b729bbeabb807a66adc4f94d61e0fa65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for pyxides 0.3.0
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.