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=(True, 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.3.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: contrat-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 94ddab33aaf432691a53c48b0bb9270cb02aab836f1802698fce63842c29b602
MD5 e185662dcab363741acdcfb8ba8d6ae8
BLAKE2b-256 f9a39ce09bc79f14717b1584072f87d74048574b6f79b942165adb5ec2b58ae3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: contrat-0.3.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.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 396fdb5d8d021315817603b12fd6705058a3c3eae3aa10d790067de8dbe7bf52
MD5 4a3a4ae1b2bb630aa1dd320bc6392e5a
BLAKE2b-256 774916560792ded54452e59ba29da4a452080bd365203cc187d324ec56a687be

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