Skip to main content

Txt file to Pickle file

Project description

logo

PyPI - Python Version Static Badge Static Badge

txt_to_pickle

txt_to_pickle is a method turning a txt file to a pickle file.

In layman's terms, it automates conversion by:

  1. turning a txt file to a list,
  2. saving a list to a pickle file.

Input:

  • input.txt – A txt file containing data.
  • data_length – Length of the txt file containing data for each segnment.

Output:

  • output.pkl – A pickle file of a list.

Installation

It can be installed with pip, ideally by using a virtual environment. Open up a terminal and install the package and the dependencies with:

    pip install txt_to_pickle

or

    python -m pip install txt_to_pickle

🐍 This requires Python 3.8 or newer versions


Steps to convert txt file to pickle file

  1. Prepare the input file (i.e., a txt file containing data).

  2. Know how long the data is for each segment (data_length):

           txt_to_pickle input.txt data_length output.pkl


Test

You may test the installation using the sample input file (input_string_list.pkl) located in the test folder.


♥ Lastly executed on Python 3.10 on 2025-06-12.

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

txt_to_pickle-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

txt_to_pickle-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file txt_to_pickle-0.0.1.tar.gz.

File metadata

  • Download URL: txt_to_pickle-0.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.18

File hashes

Hashes for txt_to_pickle-0.0.1.tar.gz
Algorithm Hash digest
SHA256 182cfd22953df0d27b4f7c5c77c6b1a10e45d7b71304d40dc4b02235f8252576
MD5 0703af766db1536f7c1cc3b3077ceff4
BLAKE2b-256 8cdf1d6edd9db384f5fecbf065897829afc09f386c727658a66469c561bd17c5

See more details on using hashes here.

File details

Details for the file txt_to_pickle-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: txt_to_pickle-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.18

File hashes

Hashes for txt_to_pickle-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffac37536c435a7d830a8e2c2e08dade3244c5e86be9a7ab9d46ffbdb4e3d4d3
MD5 9c748c3b9f850f0bd4537fbb39c96db5
BLAKE2b-256 1be03d4a4c763261114c1ddeb0a103a6570366c0ca006eab2e70df773fd8255c

See more details on using hashes here.

Supported by

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