Skip to main content

Python objects metadata parser.

Project description


In what follows

  • python is an alias for python3.5 or any later version (python3.6 and so on),
  • pypy is an alias for pypy3.5 or any later version (pypy3.6 and so on).


Install the latest pip & setuptools packages versions:

  • with CPython
    python -m pip install --upgrade pip setuptools
  • with PyPy
    pypy -m pip install --upgrade pip setuptools


Download and install the latest stable version from PyPI repository:

  • with CPython
    python -m pip install --upgrade paradigm
  • with PyPy
    pypy -m pip install --upgrade paradigm


Download the latest version from GitHub repository

git clone
cd paradigm


  • with CPython
    python install
  • with PyPy
    pypy install


paradigm can be used to obtain signature

>>> from paradigm import signatures

for user-defined functions

>>> def func(foo, bar=None, **kwargs):
>>> signatures.factory(func)
Plain(Parameter(name='foo', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=False), Parameter(name='bar', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=True), Parameter(name='kwargs', kind=Parameter.Kind.VARIADIC_KEYWORD, has_default=False))

for user-defined classes

>>> class UpperOut:
        def __init__(self, outfile):
            self._outfile = outfile

        def write(self, s):

        def __getattr__(self, name):
            return getattr(self._outfile, name)
>>> signatures.factory(UpperOut)
Plain(Parameter(name='outfile', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=False))

for user-defined classes methods

>>> signatures.factory(UpperOut.write)
Plain(Parameter(name='self', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=False), Parameter(name='s', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=False))

for built-in functions

>>> signatures.factory(any)
# CPython
Plain(Parameter(name='iterable', kind=Parameter.Kind.POSITIONAL_ONLY, has_default=False))
# PyPy
Plain(Parameter(name='seq', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=False))

for built-in classes

>>> signatures.factory(float)
# CPython
Plain(Parameter(name='x', kind=Parameter.Kind.POSITIONAL_ONLY, has_default=True))
# PyPy
Plain(Parameter(name='x', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=True))

for built-in classes methods

>>> signatures.factory(float.as_integer_ratio)
# CPython
Plain(Parameter(name='self', kind=Parameter.Kind.POSITIONAL_ONLY, has_default=False))
# PyPy
Plain(Parameter(name='self', kind=Parameter.Kind.POSITIONAL_OR_KEYWORD, has_default=False))

Checking if object is supported by paradigm can be done with

>>> from paradigm import definitions
>>> definitions.is_supported(int.bit_length)
>>> definitions.is_supported(int.conjugate)


Bumping version


Install bump2version.


Choose which version number category to bump following semver specification.

Test bumping version

bump2version --dry-run --verbose $CATEGORY

where $CATEGORY is the target version number category name, possible values are patch/minor/major.

Bump version

bump2version --verbose $CATEGORY

This will set version to major.minor.patch-alpha.


Test bumping version

bump2version --dry-run --verbose release

Bump version

bump2version --verbose release

This will set version to major.minor.patch.


To avoid inconsistency between branches and pull requests, bumping version should be merged into master branch as separate pull request.

Running tests


  • with CPython
    python test
  • with PyPy
    pypy test

Inside Docker container:

  • with CPython
    docker-compose --file docker-compose.cpython.yml up
  • with PyPy
    docker-compose --file docker-compose.pypy.yml up

Bash script (e.g. can be used in Git hooks):

  • with CPython



    ./ cpython
  • with PyPy

    ./ pypy

PowerShell script (e.g. can be used in Git hooks):

  • with CPython
    .\run-tests.ps1 cpython
  • with PyPy
    .\run-tests.ps1 pypy

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
paradigm-0.0.6-py3-none-any.whl (25.0 kB) Copy SHA256 hash SHA256 Wheel py3
paradigm-0.0.6.tar.gz (18.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page