Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_typex-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_typex-0.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file python_typex-0.0.2.tar.gz.

File metadata

  • Download URL: python_typex-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for python_typex-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e5178bb845b2c247d277f7e742cfcc320eab693affb2c85c8099704c1a01c940
MD5 780bfe5131bd083f9a50b2287fe68b5d
BLAKE2b-256 a02d1318d8b896a2c0be1a33436e8d1bec55b101fe746417bc9568bc1076908c

See more details on using hashes here.

File details

Details for the file python_typex-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: python_typex-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for python_typex-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6675853637dbe6b2e5cc3eea655d992710805458ff32941beeb4c9560ff9c147
MD5 4cea6bf02240a8878052d0d1e63e834b
BLAKE2b-256 801e16a81b8caeaa0ff1fbbef24d97790fd80829e7255e7351b127ce8449f249

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page