Skip to main content

pyfunx

PyPI version License: MIT PyPI Downloads

The main reason why this library was created is to:

use

from pyfunx import isinstances


def add(num1: int, num2: int) -> int:
    if isinstances(num1, num2, datatype=int):  # 41 char
        return num1 + num2
    raise TypeError("invalid arguments types")


print(add(3, 7))

in place of

def add(num1: int, num2: int) -> int:
    if isinstance(num1, int) and isinstance(num2, int):  # 51 char
        return num1 + num2
    raise TypeError("invalid arguments types")


print(add(3, 7))

and

from pyfunx import isinstances


def fun(name: str, age: int) -> None:
    if isinstances(name, age, datatype=(str, int)):  # 47 char
        print(f"your name is {name} and your age is {age}")
        return
    raise TypeError("invalid arguments types")


fun("mohamed", 23)

in place of

def fun(name: str, age: int) -> None:
    if isinstance(name, str) and isinstance(age, int):  # 50 char
        print(f"your name is {name} and your age is {age}")
        return
    raise TypeError("invalid arguments types")


fun("mohamed", 23)

but not just this there is other funcs and with a very advanced usage you can see the source code and check all the tests in the main fun.

Installation

You can install pyfunx via pip:

pip install pyfunx

License

This project is licensed under the MIT LICENSE - see the LICENSE for more details.

Metadata

Release files for pyfunx 1.0.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 pyfunx 1.0.0
File Size Uploaded Provenance Actions
pyfunx-1.0.0.tar.gz 10.8 kB Without provenance Details for pyfunx-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyfunx 1.0.0
File Interpreter ABI Platform Actions
pyfunx-1.0.0-py3-none-any.whl Python 3 none any Details for pyfunx-1.0.0-py3-none-any.whl

Total release size: 21.3 kB

Release files / pyfunx-1.0.0.tar.gz

Download URL pyfunx-1.0.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3c0041c128e64d65dbe016cf87c2f07c7e1ab280da3db745dbdc9c1aa4d4e18e
BLAKE2b-256 checksum
How to use checksums
725b9307ac68f121c5dc78f48efc576b374e89f3e6679f82a6ac53c9cf370824
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / pyfunx-1.0.0-py3-none-any.whl

Download URL pyfunx-1.0.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5784da55237f969c537b95ebd66eba7a3a154a99962e90d5303a34d0b8c218bc
BLAKE2b-256 checksum
How to use checksums
403d6059cae9ca7ce5ce59e03e25d33943151e7742c66581964a2d8f197e06b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Security for pyfunx 1.0.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

1.0.0 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