Skip to main content

Generate string and bytes ranges

Project description

Character range

Tests Documentation Status

This package does exactly what it says on the tin: Create a string or bytes range.

from character_range import (
  ByteMap, character_range, CharacterMap,
  string_range, bytes_range
)

print(list(character_range('a', 'z')))
# 'a', 'b', ..., 'y', 'z'

for element in string_range('aaa', 'aba', CharacterMap.ASCII_LOWERCASE):
  print(element)  # 'aaa', 'aab', ..., 'aay', 'aaz', 'aba'

for element in bytes_range(b'0', b'10', ByteMap.ASCII_LOWERCASE):
  print(element)  # b'0', b'1', ..., b'9', b'00', b'01', ..., b'09', b'10'

For more information, see the documentation.

Installation

This package is available on PyPI:

$ pip install character-range

Contributing

Please see Contributing 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

character-range-0.2.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

character_range-0.2.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file character-range-0.2.0.tar.gz.

File metadata

  • Download URL: character-range-0.2.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for character-range-0.2.0.tar.gz
Algorithm Hash digest
SHA256 88ca6d44c5c6156c328b87bcf97b72e2c317228f9066e7d1327c305306e90824
MD5 edaaa306ee5bce3daaac1eedb39e58bb
BLAKE2b-256 5294778f3f5f19b2d807dc7f7fcb3e70befd6df635706e7643451e1c3ea9319c

See more details on using hashes here.

File details

Details for the file character_range-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for character_range-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e508b7d125fd044c81fa8efd64213c7de9216b8f2f07120d1b072983566e9b82
MD5 6ff9beafaf39f24e85b8b15b1e1b61ab
BLAKE2b-256 a197bb6d85b7210da3afb93f3029ff1887c35a461ab48878b548c1c24cfc521c

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