Skip to main content

Python Advanced Typing

Overview

Description

python-advanced-typing is a simple Python package to help developers validate the types of variables in their codebase. With support for checking individual variables or multiple variables at once, it offers a concise way to ensure that the data you're working with meets your expectations.

Features

  • Single Variable Check: Compare a variable's type against a specific type or multiple acceptable types.
  • Bulk Verification: Validate the types of multiple variables simultaneously using a list.

Setup Instructions

Install the Package using:

pip install python-advanced-typing

Usage

Check Individual Variable

from python_advanced_typing import check_type

x = "Hello"
check_type(x, "x", str)

Bulk Check Multiple Variables

from python_advanced_typing import check_type

x = "Hello"
y = 123
z = [1, 2, 3]

check_type(
    (x, "x", str),
    (y, "y", int),
    (z, "z", list)
)

Contributing

As this is an open-source project hosted on GitHub, your contributions and improvements are welcome! Follow these general steps for contributing:

  1. Fork the Repository: Start by forking the main repository to your personal GitHub account.

  2. Clone the Forked Repository: Clone your forked repository to your local machine.

    git clone https://github.com/YidiSprei/PythonAdvancedTyping.git
    
  3. Create a New Branch: Before making any changes, create a new branch:

    git checkout -b feature-name
    
  4. Make Your Changes: Implement your features, enhancements, or bug fixes.

  5. Commit & Push:

    git add .
    git commit -m "Descriptive commit message about changes"
    git push origin feature-name
    
  6. Create a Pull Request (PR): Go to your forked repository on GitHub and click the "New Pull Request" button. Make sure the base fork is the original repository, and the head fork is your repository and branch. Fill out the PR template with the necessary details.

Remember to always be respectful and kind in all interactions with the community. It's all about learning, growing, and helping each other succeed!

Acknowledgments

Crafted with 💙 by Yidi Sprei. Kudos to all contributors and the expansive Python community for encouragement and motivation.

Release files for python-advanced-typing 0.15

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

Source distribution (sdist)

Source distribution for python-advanced-typing 0.15
File Size Uploaded
python-advanced-typing-0.15.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-advanced-typing 0.15
File Interpreter ABI Platform
python_advanced_typing-0.15-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / python-advanced-typing-0.15.tar.gz

Download URL python-advanced-typing-0.15.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aae1d5f8e50e9299008aa977a0ef1b0943af283051378e9003ba6e7e05e0f420
BLAKE2b-256 checksum
How to use checksums
78f3bc9abd0c3d9dc71e2d902fd4e52675f4924c06fc552586bdc280c9976d97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / python_advanced_typing-0.15-py3-none-any.whl

Download URL python_advanced_typing-0.15-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aee2fddd833a2fc2bd994c69fe173c3cbfd63b9d6824efeab7f8e9b3cd86de43
BLAKE2b-256 checksum
How to use checksums
0d856bac6b901da6d8584f4d20b17dd9f9fdedfbfaf74f18c179276c95b1f616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.15 This release

2 release files

0.14

2 release files

0.13

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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