Skip to main content

Python module to keep function signature introspection compatibility between python version

Project description

Build Status PyPI PyPI - Python Version PyPI - Status Code style: black

contrat

Simple python module to keep function signature introspection compatibility between python versions

Install

pip install contrat

Usage

The following example work for python 2.7 and python 3.0+:

#!/usr/bin/python
from contrat import getargspec

def sample(arg1, arg2=True, arg3=1):
    pass


print(str(getargspec(sample)))
# will display
# ArgSpec(args=['arg1', 'arg2', 'arg3'], varargs=None, keywords=None, defaults=(False, 1))

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

contrat-0.2.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

contrat-0.2.0-py2.py3-none-any.whl (6.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file contrat-0.2.0.tar.gz.

File metadata

  • Download URL: contrat-0.2.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

File hashes

Hashes for contrat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 17ddf4d25496c8e6886edf8872c8805166e681f0450dd511dfc9f3bca2a3995b
MD5 18b0681c731f85913496ff827c6d4770
BLAKE2b-256 97ab8afeee4a98f77e0854322947801a88c03801fc7c9399147c77e93699212c

See more details on using hashes here.

File details

Details for the file contrat-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: contrat-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

File hashes

Hashes for contrat-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 75ae8c67eee002ec96eb3804a507bfb43e843edee305406a599d1a4cbd467314
MD5 53764e0c22df8cb39fcead7c3cad2d61
BLAKE2b-256 dc623a4de5ae278e0aca7381d2334e31ff7e41bf40f84a1f4ef973fd90347d22

See more details on using hashes here.

Supported by

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