Skip to main content

Parsing and interpreting notation strings representing numeric sequences, ranges, and individual values. With support for various formats including simple values, range notations (e.g., '10-30'), and stepped ranges (e.g., '0--10/2'), this package simplifies the process of extracting integer values from diverse notation formats. Whether you need to parse input ranges, interpret array indexes, or handle sequence boundaries in your Python applications

Project description

Installation

With poetry

poetry add numeric_notation_parser

With pip

pip install numeric_notation_parser

Supported formats

Input is marked as a string, output as a list of int

Input Output as list
10,11,22 [10, 11, 22]
0-10 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
0-10/2 [0, 2, 4, 6, 8, 10]
10--10/3 [10, 7, 4, 1, -2, -5, -8]

Example

from numeric_notation_parser import notation_to_integer_generator

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

numeric_notation_parser-1.0.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

numeric_notation_parser-1.0.0-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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