semvec/pypi-packages huggingface dataset:
fixed-width-text-parser 0.0.1
Fixed width text parser
Requires Python: >=3.6

# Fixed width text parser to array

Parsing different defined text formats to array data

**Parser** - parse anything according to the format definition

Format definition:
 
```python

definition = [
    ['FIELD_1', 0, 1, 'string'],
    ['FIELD_2', 1, 10, 'float'],
    ['FIELD_3', 11, 10, 'float'],
    ['FIELD_4', 23, 1, 'integer'],
    ['FIELD_5', 24, 2, 'string'],
    ['FIELD_6', 26, 4, 'integer', 0],
    ['FIELD_7', 30, 4, 'integer', None],
    ['FIELD_8', 34, 4, 'float', None],
    ['FIELD_9', 38, 4, 'float', 0.0],
]
```

Field definition ```['FIELD_6', 26, 4, 'integer', 0]``` 
* 'FIELD_6' - field name
* 26 - index of text line where the field starts (count starts from 0)
* 4 - field length in characters 
* string - field value type (allowed types: string, integer, float)
* 0 - default value if empty in text line record

For every data type default value is always None if field results as empty string.
For every data type it is possible to set default value in format definition.

### Specific format parsers
* **Sps21Parser** - SPS format version num.     SPS 2.1, JAN2006



### References
* [SPS - Shell Processing Support](https://en.wikipedia.org/wiki/Shell_Processing_Support)
getadvicetest 0.0.11
This is a fancy `Hello World` to publishing Python library to PyPi.
Requires Python: >=3.8,<4.0

==========
Get Advice
==========


Introduction
============

This is a fancy `Hello World` to publishing Python library to PyPi.



Usage
=====

.. code-block:: python

   import getadvice as gadv
   gadv.advice(<insert_name>)



Description
===========

1. Input to advice() is a text string
2. Retrieve advice via REST-API



References
==========

* https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-1/
* https://python-poetry.org/docs/repositories/#adding-a-repository
aes-everywhere 1.2.10
AES Everywhere - Cross Language Encryption Library
Requires Python: >=2.7

# AES Everywhere - Cross Language Encryption Library

AES Everywhere is Cross Language Encryption Library which provides the ability to encrypt and decrypt data using a single algorithm in different programming languages and on different platforms.

This is an implementation of the AES algorithm, specifically CBC mode, with 256 bits key length and PKCS7 padding.
It implements OpenSSL compatible cryptography with random generated salt


## [Python](https://www.python.org/) implementation

Python versions >= 2.7, < 3.8

### Installation
```shell
pip install aes-everywhere
```


### Usage

```python
from AesEverywhere import aes256

# encryption
encrypted = aes256.encrypt('TEXT', 'PASSWORD')
print(encrypted)

# decryption
print(aes256.decrypt(encrypted, 'PASSWORD'))
```
py-library 1.0.0
py 工具箱
Requires Python: >=3.5

# Tools

### Prerequisites 项目使用条件
* [redis](https://redis.io/)
* [mysql](https://www.mysql.com/)
* [librdkafka](https://github.com/edenhill/librdkafka)

### Installation 安装

Linux:

```sh
pip install redis pymysql confluent_kafka
```

Windows:

* windows 下无法安装 ```confluent_kafka``` 模块

```sh
pip install redis pymysql
```

### Usage example [使用示例](example.py)
* 使用前, 请修改 ```*.conf.py``` 中的配置, 确保配置正确
```python
# [redis]
from redis_utils.redis_conn import RedisConnPool
from redis_utils.redis_conf import REDIS_CONFIG_DEV, REDIS_CONFIG_PROD

r_0 = RedisConnPool(REDIS_CONFIG_DEV['redis_name']).connect()
```

```python
# [redis]发布
from redis_utils.redis_conn import RedisConnPool
from redis_utils.redis_conf import REDIS_CONFIG_DEV, REDIS_CONFIG_PROD
r_0 = RedisConnPool(REDIS_CONFIG_DEV['redis_name']).connect()
chan_sub = 'channel_name'
message_content = 'Hello World'
r_0.publish(chan_sub, message_content)

# [redis]订阅
channel_sub = 'channel_name'
redis_conn = RedisConnPool(REDIS_CONFIG_PROD['redis_name'])
redis_sub = redis_conn.subscribe(channel_sub)
r_0 = redis_conn.connect()
while True:
    msg = redis_sub.listen()
    for i in msg:
        if i["type"] == "message" and i['channel'] == channel_sub:
            print(f'接收到消息: {i["data"]=}')
```

```python
# [mysql]
from mysql_utils.mysql_conn import MysqlPooledDB
from mysql_utils.mysql_conf import MYSQL_CONFIG_DEV, MYSQL_CONFIG_PROD

conn, cursor = MysqlPooledDB(MYSQL_CONFIG_DEV['db_name']).connect()
```

```python
# [kafka]
# 详细参考: https://github.com/confluentinc/confluent-kafka-python
 
from kafka_utils.kafka_tool import ConfluentKafkaProducer, ConfluentKafkaConsumer

producer = ConfluentKafkaProducer().producer()
consumer = ConfluentKafkaConsumer().consumer()
```


## Contributing 贡献指南

有什么问题或建议, 可以在 [issues](https://github.com/CLannadZSY/Tools/issues) 中告诉我

## Release History 版本历史

* 2020-03-28: 完成```1.0.0```版本 

## License 授权协议

这个项目 MIT 协议， 请点击 [LICENSE](LICENSE) 了解更多细节。