semvec/pypi-packages huggingface dataset:
projectlumina.py 1.0.0
A simple Python library that includes a Project Lumina API wrapper and a Minecraft Bedrock World Editor.
License: MIT

# projectlumina.py
A simple Python library that includes a Project Lumina API wrapper and a Minecraft Bedrock World Editor.

## Features
- The **API wrapper** allows you to easily fetch Project Lumina shortcut information, such as the latest release URL.
- The **World Editor** allows you to seamlessly convert and modify your Minecraft Bedrock level file. Some of it uses https://projectlumina.xyz/worldeditor/ to function.

## Installation
To install, use the following pip command:
```
pip install projectlumina
```

## Examples
### API wrapper
```python
import projectlumina

# Fetching information about Project Lumina.

api = projectlumina.Api() # Creates an API instance.

about = api.about # about.txt
connections = api.connections # connections.json
options = api.options # options.json
packs = api.packs # packs.json
releases = api.releases # releases.json

# You can still fetch these using the fetch() function if needed:
packs = api.fetch('packs.json')

# However, the fetch() function has to be used to fetch nested items:
esp_zip = api.fetch('packs/esp/esp.zip')
```

### World Editor
```python
import projectlumina

# Converting a level.dat file and returning it as level.snbt.

level_dat = projectlumina.WorldEditor('level.dat') # Note: converting only works by passing a file, not text.

level_snbt = level_dat.convert('snbt')

print(level_snbt) # Printing the converted file.
```

## Links
- [Website](https://projectlumina.xyz)
- [Discord](https://discord.com/invite/7ppv6m7huM)
- [YouTube](https://www.youtube.com/@ProjectLuminaMC)
- [Twitter (X)](https://x.com/ProjectLuminaMC)
- [Buy Me a Coffee](https://buymeacoffee.com/projectlumina)
pycobol2csv 1.0.6
A Python library to convert COBOL ebcdic file to CSV format based on copybook
License: MIT
Keywords: COBOL, EBCDIC, CSV

# pycobol2csv
pycobol2csv is a Python library to convert COBOL ebcdic file to CSV format. The package is built to cater for advanced features in COBOL copybooks such as *OCCURES x TIMES*, *BINARY*, *COMP*. 

The CSV file is RDBMS friendly and all headers are ready to be used as database column names.
CSV conversion is controlled by config file in *csv_config.json*

- [x] Update in version 1.0.6

Recently Microsoft *upgraded* Spark in Synapse from version 3.2 to 3.4, which *upgraded* the included Python version from 3.8 to 3.10, which is a version with known issues on csv writer. 

Any users on Python 3.10 should **upgrade to pycobol2csv 1.0.6 and above ASAP**, otherwise there might get an error *_csv.Error: need to escape, but no escapechar set*. 

Other Python versions (such as 3.8, 3.11) are safe so far.

- [x] Update in version 1.0.5

Added more enhancements for the outdated REDEFINE and PIC syntax for a new client.



#### Install the python module:



`pip install pycobol2csv`

#### To use the module:

```
from pycobol2csv import convert_cobol_file, decode_copybook_file

row_length, cobol_struc = decode_copybook_file(copybook_file)

convert_cobol_file(copybook_file, data_file, output_file, config_file, codepage, debug=False)

```

- copybook_file: copybook filename
- data_file: data filename 
- output_file: output csv filename
- config_file: csv configuration filename, refer to csv_config.json
- codepage: codepage for edibic, refer to https://docs.python.org/3.7/library/codecs.html#standard-encodings for details
- debug: enable for more debug information, default is OFF

#### test 

2 sets of test data have been created from scratch. Each set includes a copybook and an EBCDIC data file.

To test:

```
python convert_cobol_test_main.py --copybook [COPYBOOK_FILE] --data [DATA_FILE] --output [CSV_FILE]

```

#### known issues and limitations

- Be aware of the resources available in your runtime environment and make sure the Cobol file size is not beyond the limit or cause any performance issue.

To handle large Cobol files, you can split the files into smaller chunks and then process the chunks in parallel. Please refer to the [medium post](https://medium.com/@jasonli.lijie/process-large-cobol-files-efficiently-with-pycobol2csv-pycobol2parquet-f023533607e4) for details.


<!-- Repo: https://github.com/jasonli-lijie/pycobol2csv -->