Skip to main content

CodeHint is a package for describing python functions and methods in console during runtime.

Project description

CodeHint is a package for describing a function within the python console during runtime. It works in the same way as an advanced IDE does when it displays the hint for function, but pretty-printing to console rather than to a window.

https://badge.fury.io/py/codehint.svg https://travis-ci.org/ipazc/codehint.svg?branch=master https://coveralls.io/repos/github/ipazc/codehint/badge.svg?branch=master

Example

If we have the following function defined somewhere in our code:

>>> def hello(a, b:int, c) -> int:
...     """
...     Hello, this is an explanation
...     of what this is going to do
...     :param a: foo
...     :param b: bar example
...     :param c:
...     :return: True if good, False otherwise.
...     """
...     x = a + b * 2*c
...     return x

It can be described later on with CodeHint:

>>> from codehint import hint
>>> hint(hello)

The result is

------------------------
def hello(a, b:int, c) -> int:

    Hello, this is an explanation of what this is going to do

=== Parameters: 3 ======
 [0] a (type Any) ->   foo
 [1] b (type int) ->   bar example
 [2] c (type Any) ->
========================
 Result (type int) ->  True if good, False otherwise.

CodeHint currently can only be used to describe the signature of functions or methods.

Installation

It is only supported Python 3.4.1 onwards:

sudo pip3 install codehint

LICENSE

It is released under the MIT 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

codehint-0.0.1.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file codehint-0.0.1.tar.gz.

File metadata

  • Download URL: codehint-0.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for codehint-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cb5dc624b5722f1f5333f6d87d14f70a4f9259624539f1ec7b615b15d9a8beee
MD5 1bc8bdf34494bca9a23ba9254f247e2c
BLAKE2b-256 0ce97024c2f3a3f409b3e4d59509d673468f48eb6423e2e42fb4aa1a95bc4ee6

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