Skip to main content

This module provide a easy, non intrusive way to process a big list of files in a parallel way. Also provides the option to process theses files with a different packs of options, evaluate and generate reports.

Requirements:

You need the PPSS script in same dir of this file.

Instructions:

  1. Import this module from your main file

    import pyCorpus
    
  2. Create the function that process the file

    def my_process(file_name, config):
        # Some science stuff with the file
    
  3. (Optional) Create a function that return a argument parser that capture all the configs that you need.

    def my_parser():
        # Set up your argparse parser
        # Return the parser
        return my_parser_instance
    
  4. Add at the end of the file something like this:

    if __name__ == "__main__":
        corpus_processor = pyCorpus.CorpusProcessor(parse_cmd_arguments, process_file)
        corpus_processor.run_corpus()
    

NOTES:

  • Dot not ADD the () to my_parser and my_process arguments.

  • If you don't need options you can ignore step 3 and the config file come as None. But never use the --config parameter.

  • The files are processed in a concurrent way so if you might store any results don't use the sys.out use a file.

Download files

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

Source Distribution

pycorpus-2.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycorpus-2.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pycorpus-2.3.tar.gz.

File metadata

  • Download URL: pycorpus-2.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.5 Linux/5.4.0-73-generic

File hashes

Hashes for pycorpus-2.3.tar.gz
Algorithm Hash digest
SHA256 aa07ea9d54d5b9903ad492f2ca6dc18e37179f7dca07106826964378607e2219
MD5 3e6b808707f0cb9816c3ad28c36ff987
BLAKE2b-256 7244dc7cb8e3e1a473d16b44d802d8c293555ac43aa0c47a48f56ba55881f898

See more details on using hashes here.

File details

Details for the file pycorpus-2.3-py3-none-any.whl.

File metadata

  • Download URL: pycorpus-2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.5 Linux/5.4.0-73-generic

File hashes

Hashes for pycorpus-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c6709e7137411d8994ea13dcfec992a19c92c23f9c84184c37319c2dcbf553b
MD5 1e3afaed4224aa2b7af965e40066398c
BLAKE2b-256 a6335ecf4003f876ac7b8100cbe2896c439cf6a2015b78ef54b291f4593d769b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.3 This release

2 files

2.2

2 files

2.1

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

1 file

1.8.0

2 files

1.6.0

2 files

1.5.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page