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.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

contrat-0.1.0-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: contrat-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 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.1.0.tar.gz
Algorithm Hash digest
SHA256 20a140ff7158af8fbdf9ad3bc2649693a55bbfd939468e55e8489d3f984a8e8e
MD5 56d542866ccfcfc20eee2fc97af32386
BLAKE2b-256 c8addbff18e5ac31e3663b6827e1f7c0d2c03b296282b65e251be9b759474e5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: contrat-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.7 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.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 23e0d656f678e9f53165794f45658117517d1048d05b7c7ba782e30fabca6932
MD5 b79a3ce074afb9ce3f62c0f5391fda48
BLAKE2b-256 052cf1dd7ac82905507d9532796e7540193991cf007b9cb86ba2702503d414f4

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