Skip to main content

Load & save data & chat with LLMs

Project description

Pitchoune

A Python library on top of Polars to load & save (normal or streaming mode) data from files. Can also chat with LLM in local with Ollama or with OpenAI API.

Features

  • Load / save dataframe :

    • Handle files types : xlsx, csv, tsv, jsonl
    • Possibility to register your own file types (see custom_io_example)
  • Read / write stream :

    • Handle files types : jsonl (soon csv/tsv)
    • Call the decorated function for each row of the streamed file
    • Inject each column as a parameter of the function
    • Provide as parameters the current_row and total_row
    • Can handle recovery (in case of error or process stopping) with the parameter "recover_from". Just set it to the output file path and it will use the right row for the read_stream function.
    • Multiple outputs (see multiple_outputs_example.py)
  • Current workdir for filepaths : set PITCHOUNE_WORKDIR env variable

  • token replacement in filepaths

  • conf: token replacement in filepaths (read value from key in .conf file)

  • handle .conf file in PITCHOUNE_WORKDIR

  • Save to a file with human check option enabled :

    • Open the file with the default editor
    • Then wait for the user to review it & save it
  • Use chat :

    • Ollama chat (see chat_example)
    • OpenAI chat (you must then set OPENAI_API_KEY env variable)

Todo

  • Testing

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

pitchoune-0.60.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

pitchoune-0.60.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file pitchoune-0.60.1.tar.gz.

File metadata

  • Download URL: pitchoune-0.60.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pitchoune-0.60.1.tar.gz
Algorithm Hash digest
SHA256 86032a59f536718122afb59e292c1ab320f9128864eb28923c2da0e06c910a3a
MD5 daa58cd3a332ea45419bd00bf1ef9388
BLAKE2b-256 8361301633cd2ee6aefa71393835acc95e132e4bd4034b1660e381f5d32bfea4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pitchoune-0.60.1.tar.gz:

Publisher: pypi-publish.yml on pe-brian/pitchoune

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pitchoune-0.60.1-py3-none-any.whl.

File metadata

  • Download URL: pitchoune-0.60.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pitchoune-0.60.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d4e63f4735a591cb0e8eb3bb37f685ab19e25adf351324b9e1d2a8cc7162db1
MD5 fcdc39d8331967a2b9d4d66ac0e96c47
BLAKE2b-256 64b42fb5e9919f75a9293b04b59a207f768540adebec3a2d4334d0f433be9bc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pitchoune-0.60.1-py3-none-any.whl:

Publisher: pypi-publish.yml on pe-brian/pitchoune

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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