semvec/pypi-packages huggingface dataset:
CueParser 1.3.3
Simple cue file parser.
Keywords: cue parser cdtool audio generator

.. image:: https://img.shields.io/pypi/v/CueParser.svg
   :alt: PyPI version shields.io
   :target: https://pypi.python.org/pypi/CueParser/

CueParser
=========

Simple cue file parser and generator written in python. 
Parser outputs cue file content in plain text. Generator can create cue file from timed tracklist.

Installation
============

**$ pip install CueParser**

Usage
=====

:: 

    usage: cueparser.py [-h] [-H HEADER] [-t TRACK] file

::

    positional arguments:
      file                  path to cue file

    optional arguments:
      -h, --help            show this help message and exit
      -H HEADER, --header HEADER
                            header output template
      -t TRACK, --track TRACK
                            track output template

:: 

    usage: cuegen.py [-h] [-p PERFORMER] [-t TITLE] [-a AUDIO_FILE] [-e AUDIO_FILE_EXT] [-f FILE]

::

    options:
      -h, --help            show this help message and exit
      -p PERFORMER, --performer PERFORMER
                            PERFORMER
      -t TITLE, --title TITLE
                            TITLE
      -a AUDIO_FILE, --audio_file AUDIO_FILE
                            FILE
      -e AUDIO_FILE_EXT, --audio_file_ext AUDIO_FILE_EXT
                            FILE EXTENSION
      -f FILE, --file FILE  path to tracklist file

Example
=======

**$ cueparser.py file.cue**

will output content with such template: 

* for header: %performer% - %title%\\n%file%\\n%tracks% (also can be %format%, %rem%, %songwriter%) 
* for tracks: %performer% - %title% (also can be %cuetime%, %offset%, %index%, %songwriter%)

**$ cuegen.py -f file.txt**

will create cue file from tracklist looks like:

::

    [00:00] Artist 1 - Title 1
    [03:00] Artist 2 - Title 2
    etc...

or it can generate cuesheet from audacity labels file:

::

   0.000000    1.000000    Artist 1 - Label 1
   2.500000    4.200000    Artist 2 - Label 2
   6.800000    8.000000    Artist 3 - Label 3


Library example
===============

.. code:: python 

    cuesheet = CueSheet()
    cuesheet.setOutputFormat(args.header, args.track) 
    with open(cuefile, "r") as f: 
        cuesheet.setData(f.read())

    cuesheet.parse()
    print(cuesheet.output())
pybulk 0.2.21
PyBulk is a Python module that to allow simple and fast bulk data insertion into databases
Requires Python: >=3.6

# PyBulk 🚀
[简体中文](README_CN.md) | English

PyBulk is a Python module that wraps PyMySQL to allow simple and fast bulk data insertion into databases. With PyBulk, you can insert thousands of records into a database table in just a few lines of code.

PyBulk builds on top of the PyMySQL library and connection pool to efficiently reuse connections and minimize latency. It handles all the low-level details of executing multiple INSERT statements while protecting your database from overload.

Some of the main features of PyBulk include:
* **Simple API**: Insert bulk data with just a few function calls. No complicated setup required.
* **Speed**: Leverages PyMySQL's connection pool to quickly insert thousands of records.
* **Reliability**: Includes error handling and recovery mechanisms to handle transient database errors. Retries failed queries automatically.
* **Support for REPLACE INTO**: Upsert support allows you to replace existing records in a table or insert new ones.
* **Compatibility**: Works with MySQL, MariaDB and AWS RDS. Compatible with Python 2 and 3.

PyBulk allows you to focus on your application's logic rather than spending time building infrastructure to handle database load. It is a robust but lightweight solution ideal for batch data processing applications. 
## 💾 Installation

```
pip install pybulk
```

## 🔧 Usage:
```
import pybulk

cfg = {
'host': 'localhost',
'port':  3306,
'user':  'root',
'password': 'root',
'db': 'info',
'charset': 'utf8',
}

db = pybulk.client(cfg)

my_data = [
{'name': 'Peter', 'age': 21,},
{'name': 'Harry', 'age': 35,},
{'name': 'Mark', 'age': 40,},
]

db.push_data('student', my_data, size=2000)

# You can also run sql in pybulk like:

data = db.excute_sql('select * from school')
```