Skip to main content

A library for transparent transformation of indexable containers (lists, etc.)

Project description

PyPi package Continuous integration Documentation Code quality analysis Tests coverage Citable paper

SeqTools

SeqTools facilitates the manipulation of datasets and the evaluation of a transformation pipeline. Some of the provided functionalities include: mapping element-wise operations, reordering, reindexing, concatenation, joining, slicing, minibatching, etc.

To improve ease of use, SeqTools manipulates list-like objects, otherwise known as a sequences (objects with a length supporting integer or slice based indexing).

Manipulating a dataset as a whole can be slow and resource/memory intensive. To circumvent this issue, SeqTools implements on-demand evaluation under the hood: operations and transformations on a dataset are only applied to individual items when they are actually accessed. This is particularly convenient for prototyping.

When comes the transition from prototyping to execution, the list-like container interface facilitates serial evaluation. Besides, SeqTools also provides simple helpers to dispatch work between multiple workers (threads or processes).

SeqTools originally targets data science, more precisely the data preprocessing stages. Being aware of the experimental nature of this usage, on-demand execution is made as transparent as possible to users by providing fault-tolerant functions and insightful error reporting. Moreover, internal code is kept concise and clear with comments to facilitate error tracing through a failing transformation pipeline.

Example

>>> def f1(x):
... return x + 1
...
>>> def f2(x): # slow and memory heavy transformation
... time.sleep(.01)
... return [x for _ in range(500)]
...
>>> def f3(x):
... return sum(x) / len(x)
...
>>> data = list(range(1000))

Without delayed evaluation, defining the pipeline and reading values looks like so:

>>> tmp1 = [f1(x) for x in data]
>>> tmp2 = [f2(x) for x in tmp1] # takes 10 seconds and a lot of memory
>>> res = [f3(x) for x in tmp2]
>>> print(res[2])
3.0
>>> print(max(tmp2[2])) # requires to store 499 500 useless values along
3

With seqtools:

>>> tmp1 = seqtools.smap(f1, data)
>>> tmp2 = seqtools.smap(f2, tmp1)
>>> res = seqtools.smap(f3, tmp2) # no computations so far
>>> print(res[2]) # takes 0.01 seconds
3.0
>>> print(max(tmp2[2])) # easy access to intermediate results
3

Batteries included!

The library comes with a set of functions to manipulate sequences:

concatenate
batch
gather
prefetch
interleaving

and others (suggestions are also welcome).

Installation

pip install seqtools

Documentation

The documentation is hosted at https://seqtools-doc.readthedocs.io.

Contributing and Support

Use the issue tracker to request features, propose improvements or report issues. For questions regarding usage, please send an email.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

SeqTools-1.0.0-cp38-cp38-manylinux2010_x86_64.whl (41.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

SeqTools-1.0.0-cp38-cp38-manylinux2010_i686.whl (45.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

SeqTools-1.0.0-cp38-cp38-manylinux1_x86_64.whl (41.1 kB view details)

Uploaded CPython 3.8

SeqTools-1.0.0-cp38-cp38-manylinux1_i686.whl (45.3 kB view details)

Uploaded CPython 3.8

SeqTools-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl (40.2 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

SeqTools-1.0.0-cp37-cp37m-manylinux2010_i686.whl (45.3 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

SeqTools-1.0.0-cp37-cp37m-manylinux1_x86_64.whl (40.2 kB view details)

Uploaded CPython 3.7m

SeqTools-1.0.0-cp37-cp37m-manylinux1_i686.whl (45.3 kB view details)

Uploaded CPython 3.7m

SeqTools-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl (40.2 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

SeqTools-1.0.0-cp36-cp36m-manylinux2010_i686.whl (44.4 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

SeqTools-1.0.0-cp36-cp36m-manylinux1_x86_64.whl (40.2 kB view details)

Uploaded CPython 3.6m

SeqTools-1.0.0-cp36-cp36m-manylinux1_i686.whl (44.4 kB view details)

Uploaded CPython 3.6m

SeqTools-1.0.0-cp35-cp35m-manylinux2010_x86_64.whl (40.2 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

SeqTools-1.0.0-cp35-cp35m-manylinux2010_i686.whl (44.2 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ i686

SeqTools-1.0.0-cp35-cp35m-manylinux1_x86_64.whl (40.2 kB view details)

Uploaded CPython 3.5m

SeqTools-1.0.0-cp35-cp35m-manylinux1_i686.whl (44.2 kB view details)

Uploaded CPython 3.5m

File details

Details for the file SeqTools-1.0.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for SeqTools-1.0.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0f141af2fd07a9a0feeabddd4856943d9dfe110b299e0bfc1182e2c608adabf7
MD5 4908e1ddec6c9d2c4063912d3460301d
BLAKE2b-256 253a153f4c2174e06ca3dd77a832e4d9fdee841770754344d30ebf6d7699951c

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp38-cp38-manylinux2010_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp38-cp38-manylinux2010_i686.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for SeqTools-1.0.0-cp38-cp38-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 a00ebe072c660def458642cd164a0eb3c8bfee73f22a24fcd4f1fa92a672aa15
MD5 55da978cca471b526ae0be25c76d0622
BLAKE2b-256 3fbaccbc6afca259d374ac2c54774fa1562e93462a6fb20790704f7170da441d

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for SeqTools-1.0.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8d51c8f8b23938e0ede97461c018b00cb4cb6968234ac4faee4d720851d8022b
MD5 a0f27f10f8c446884a6d73e111313e2c
BLAKE2b-256 55249949ff6ebdb39fb9ed67c46bbd52ecf78382fc33cce2572656aa832eb96d

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for SeqTools-1.0.0-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8b05d65650bd7e66c45ee9828221d78b2b2b646f5bc2f2e741ec6c73af7b915b
MD5 3857ac36c0906ae972d732a0ae8d3ca5
BLAKE2b-256 fe67bc71069243b90b3faec9d32f206edb78317ffca942e3e5a706e3b3d66e5f

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1

File hashes

Hashes for SeqTools-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6431bfac54f71b1c5c56b289ebdd2148e94308ab134bd74d43d0573b001b8e34
MD5 a2fdca89383ff0f719dd66adc6eaed7c
BLAKE2b-256 52b1bd9b004a99731e15d520daf0c75c6fa96324bb4c14bb14022ff968fe5a90

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp37-cp37m-manylinux2010_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp37-cp37m-manylinux2010_i686.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1

File hashes

Hashes for SeqTools-1.0.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 3b8fc0e44fb601b614913bee9e3c85fee40a89377cd315fb3fa07a398defe860
MD5 e84e468c39a4760c631f7f2adf9203d3
BLAKE2b-256 418333dfb55edc5af78068392977460bc257a4d1c7da1fa69d75d65c3dc7e6d0

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1

File hashes

Hashes for SeqTools-1.0.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cca59dbe1a1a2bfea890f99a7c65a8440f1d2c4223a0467dfb2da56e9cecdd55
MD5 57577d8b2111f0bfcde7c5426ac5b3f1
BLAKE2b-256 02f0949adc06fe163076de47f3a12a04b07c03ba5cd18a72bf9ece139b81813f

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1

File hashes

Hashes for SeqTools-1.0.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 168980b7b641b46686ac40dcea038ae2ee86b72e41708e087b1af4b2b37d1903
MD5 e77a4a348cf368d50212b26b584e5fe4
BLAKE2b-256 99971ccb54e53cb0d91c33c7325fc6b64d1245d39a55a2d0c469eb9d0c60c8e4

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7

File hashes

Hashes for SeqTools-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 90698bdc1966347605066b56982b4491ad8aec00261831d373a09011ec5d9751
MD5 e178ad595ecfa64c033023922d2360b4
BLAKE2b-256 dd87912d2c0d79c31762a003cd28638a2bcc85f0fc9b0e08b5f9d30ec65413d6

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp36-cp36m-manylinux2010_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp36-cp36m-manylinux2010_i686.whl
  • Upload date:
  • Size: 44.4 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7

File hashes

Hashes for SeqTools-1.0.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 f69a60ee5009346e91847c95796527ca36e9591d155ff96ccc781c329525675b
MD5 7ca8cd575f8cee939408b630a84cefb3
BLAKE2b-256 c390bd435fdf65521466bf62f385f2c7b82f565b61cd643db76bd3824ac4812a

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7

File hashes

Hashes for SeqTools-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bd5e2c5e8274ef1054988f0d7fba0c59d578f794f986c77f725bb5ebcb76e35c
MD5 708c7175c744b99f0154556e02ab0a09
BLAKE2b-256 1fd48afd9653cd150151963c819ecc982b6b28fa428fdc1b7aa6c8a7ab14bca7

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 44.4 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7

File hashes

Hashes for SeqTools-1.0.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0d2736c7903533e798292046d9716517926b3c29847543ea94ff94bb52603e19
MD5 540f1cb4ad38c54137942c2fecf32da3
BLAKE2b-256 4a3566f7686c54d722593b982e8f25c210afefc39e77413399007bbe8d648261

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.5.6

File hashes

Hashes for SeqTools-1.0.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 52fb0a46e7d85ab9105636ade41d032781541665928a47c71355cf7e48c6c4b7
MD5 9419964da76ba962ae7db695f89b1551
BLAKE2b-256 c278179374b6f7af42e5d7ffa34c4ed6ef1453f8fe808be8f55e733dc53adf1d

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp35-cp35m-manylinux2010_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp35-cp35m-manylinux2010_i686.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.5.6

File hashes

Hashes for SeqTools-1.0.0-cp35-cp35m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 d4ac7b4a716c217f154673150d22d66d47338728bad53123ab7f020b6784c263
MD5 78565697cce8f099698f175e49e02c91
BLAKE2b-256 5916c88f9006b9ea4c6d5225a1bbc7b8abb0504a1b396879ca3a6501e19121bc

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.5.6

File hashes

Hashes for SeqTools-1.0.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 53f428a601fbfc04bad1acd3ac715ed8c6fc5458d545180be348e6ae13d9c4e1
MD5 c815d0ab91c84870074c10470a8b08c4
BLAKE2b-256 b653ac2d45cbd2d13ffa189fc6071eeb2d39382fe5f323e942ac0a764382d139

See more details on using hashes here.

File details

Details for the file SeqTools-1.0.0-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: SeqTools-1.0.0-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.5.6

File hashes

Hashes for SeqTools-1.0.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 d3b090419489e30a4ec43906915a81858ac406e7cefe2edabc792ca55afced3a
MD5 cd8f20ce230a48b85ee672286ebff24a
BLAKE2b-256 d90a3127b0fa55dd38c124db9f929e37b14db45a88a3473bc45b70d99ec4c1f4

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