Skip to main content

Small utility to work with Python tokens

Project description


This project consists of a single module which is extracted from the ideas package. Its purpose is to simplify manipulations of tokens from Python's tokenize module. One of its features is that, unlike Python's version, the following is always guaranteed:

from token_utils import tokenize, untokenize

source = "Arbitrary Python code here"

assert source == untokenize(tokenize(source))

See ideas documentation for more information

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

token-utils-0.1.8.tar.gz (5.3 kB view hashes)

Uploaded source

Built Distribution

token_utils-0.1.8-py3-none-any.whl (6.3 kB view hashes)

Uploaded py3

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