A Python package for text processing and argument parsing
Project description
my-collection
Python-пакет для обробки тексту, включаючи підрахунок унікальних символів,підтримує обробку даних черех командний рядок.
Зміст
- Посилання проекту
- Встановлення
- Використання
- Документація
- Приклади
- Оновлення пакету
- Тестування
- Структура проєкту
- Пошук проблем
Посилання проекту
- Домашня сторінка: my-collection на GitLab
- Випуски: Releases
- Ліцензія: MIT License
- Відкрити Issue: Створити Issue
Встановлення
pip install my-collection
Використання
CLI
- Для обробки текстового рядка:
my-collection --string "This is a test"
- Для обробки текстового файлу:
my-collection --file path/to/text.txt
Примітка aргумент
--fileмає вищий пріоритет над--string. Якщо обидва аргументи не передані, програма завершиться з помилкою.
Використання у Python-коді
from my_collection import unique_char_count
text = "example text"
result = unique_char_count(text)
print(f"Unique character count: {result}")
Документація
- Відкрий Python-інтерпретатор:
python
- Імпортуй функцію та використовуй
help():
from my_collection import unique_char_count
help(unique_char_count)
Приклади
Підрахунок унікальних символів у рядку
from my_collection import unique_char_count
print(unique_char_count("abbbccdf")) # Виведе: 3
Використання CLI
my-collection --string "abbbccdf"
# Виведе: Unique character count: 3
Оновлення пакету
pip install --upgrade my-collection
Тестування
- Клонувати репозиторій:
git clone https://git.foxminded.ua/liliia-shpytsia-mentoring/task-5-packaging.git
cd task-5-packaging
- Встановити залежності для розробки:
pip install -r requirements.txt
- Запустити тести:
pytest
Структура проекту
task_5_packaging/
+-- src/
| +-- my_collection/
| | +-- __init__.py
| | +-- collect_framework.py
| | +-- text.txt
| | +-- unique_char.py
|-- tests/
| +-- __init__.py
| +-- test_collect_framework.py
| +-- test_unique_char.py
|-- .flake8
|-- .gitignore
|-- .gitlab-ci.yml
|-- LICENSE
|-- pyproject.toml
+-- requirements.txt
Пошук проблем
- Якщо виникли проблеми, створи [Issue] (https://git.foxminded.ua/liliia-shpytsia-mentoring/task-5-packaging/-/issues) на GitLab.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file my_collection-0.1.3.tar.gz.
File metadata
- Download URL: my_collection-0.1.3.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f636886ff97741e58c2f6140f1a86b4b9cf2c57f58430e641cf3f29b374d0082
|
|
| MD5 |
f6d8a9a7492b6ffe944b64c61cb0d3f2
|
|
| BLAKE2b-256 |
f0062fd5fdaacc5a79d4086b5e27ce5c7805c9d05833c9742f3f28238e079ba9
|
File details
Details for the file my_collection-0.1.3-py3-none-any.whl.
File metadata
- Download URL: my_collection-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb5dcd84bac75f2e6e79c7925ade8ef57c9392dbf36104e9ca12314c386ae71
|
|
| MD5 |
633e9ebe59c2730f5c7b3f688e1188ee
|
|
| BLAKE2b-256 |
ba3c9ccbe7b80b790d7af29d6563c0ea9fedae692b58fb5ccd581e8d017ae994
|