Skip to main content

py-patterns

A util library for common patterns in python.

Supported patterns

  1. Adapters

Install

pip install py-patterns-util

Example

from py_patterns.adapters import Field, Adapter


class PersonAdapter(Adapter):
    last_name = Field(source="person.last_name", dtype=str)
    first_name = Field(source="person.first_name", dtype=str)
    age = Field(source="person.age", dtype=int)


source_data = {"person": {"last_name": "Smith", "first_name": "John", "age": 30}}

# {"last_name": "Smith", "first_name": "John", "age": 30}
converted_data = PersonAdapter(source_data=source_data).convert()

Metadata

Release files for py-patterns-util 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-patterns-util 0.1.1
File Size Uploaded Provenance Actions
py-patterns-util-0.1.1.tar.gz 3.7 kB Without provenance Details for py-patterns-util-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-patterns-util 0.1.1
File Interpreter ABI Platform Actions
py_patterns_util-0.1.1-py3-none-any.whl Python 3 none any Details for py_patterns_util-0.1.1-py3-none-any.whl

Total release size: 8.6 kB

Release files / py-patterns-util-0.1.1.tar.gz

Download URL py-patterns-util-0.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
433e529e52d592a8963e8878b41fdcbfd8ae57d50015915c355201c5c879ecd0
BLAKE2b-256 checksum
How to use checksums
0c0a06e8f382851d7f97340ef5e69323e3f2dbc5003be3b0119e83e27ab53218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.10 CPython/3.9.7 Darwin/20.6.0

Release files / py_patterns_util-0.1.1-py3-none-any.whl

Download URL py_patterns_util-0.1.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e74109da98e312dd1316e06d102c5d45232a154fa761d7c7a891d56921da6a7
BLAKE2b-256 checksum
How to use checksums
decb6db980a262c78eb59f36c7cc2ec637e611fcff3b491b4422a60fa7443e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.10 CPython/3.9.7 Darwin/20.6.0

Security for py-patterns-util 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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