Skip to main content

Modernpy

Extension methods for built-in type in Python.

Usage

Integer

(123).instance_of(int) (123).to_s() == “123” (123).to_f() == 123.0 and (123).to_f().instance_of(float)

float

(123.45).instance_of(float) (123.45).to_s() == “123.45” (123.45).to_i() == 123

str

“hello”.instance_of(str) “hello”.length == 5 “123”.to_i() == 123 “123.45”.to_f() == 123.45 “hello”.to_s() == “hello”

Unicode

u”hello”.instance_of(unicode) u”hello”.length == 5 u”123”.to_i() == 123 u”123.45”.to_f() == 123.45 u”hello”.to_s() == u”hello”

list

[1, 2, 3, 4].instance_of(list) [1, 2, 3, 4].length == 4 [1, 2, 3, 4].sum() == 10

tuple

(1, 2, 3, 4).instance_of(tuple) (1, 2, 3, 4).length == 4 (1, 2, 3, 4).sum() == 10

Metadata

Release files for modernpy 0.1.0

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

Source distribution (sdist)

Source distribution for modernpy 0.1.0
File Size Uploaded Provenance
modernpy-0.1.0.zip 5.4 kB Without provenance Details

Release files / modernpy-0.1.0.zip

Download URL modernpy-0.1.0.zip
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ea9126d422996e2962dab36d17f029cf11eef77cf2b4f68dad93be6f8fc70695
BLAKE2b-256 checksum
How to use checksums
75f02f6b6c1688afdf41afa84f8999f2c47ba065bd65cf242260b260380564d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for modernpy 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file 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