Skip to main content

PythonVersion Coveralls Testing Linter PyPi

TypEx

:+1: If you are using the code please add a star to the repository :+1:

This work is made available by a community of people, amoung which the CEA Neurospin BAOBAB laboratory.

Content

TypEx supplies a simple decorator to enforce Python types on function parameters when annotations are available.

Where to start

Please find below a simple usage example:

from typex import typecheck

@typecheck(hints_params=True, hints_return=True)
def halve_integer(a: int) -> float:
    return a / 2

halve_integer(5)  # 2.5
halve_integer(5.0)  # TraitsError

Install

The PyPi package is available online.

Contributing

If you want to contribute to typex, be sure to review the contribution guidelines.

License

This project is under the following LICENSE.

Metadata

Release files for python-typex 0.0.2

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-typex 0.0.2
File Size Uploaded
python_typex-0.0.2.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-typex 0.0.2
File Interpreter ABI Platform
python_typex-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / python_typex-0.0.2.tar.gz

Download URL python_typex-0.0.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e5178bb845b2c247d277f7e742cfcc320eab693affb2c85c8099704c1a01c940
BLAKE2b-256 checksum
How to use checksums
a02d1318d8b896a2c0be1a33436e8d1bec55b101fe746417bc9568bc1076908c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / python_typex-0.0.2-py3-none-any.whl

Download URL python_typex-0.0.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6675853637dbe6b2e5cc3eea655d992710805458ff32941beeb4c9560ff9c147
BLAKE2b-256 checksum
How to use checksums
801e16a81b8caeaa0ff1fbbef24d97790fd80829e7255e7351b127ce8449f249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

1 release file

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