Skip to main content

A Python package for text processing and argument parsing

Project description

my-collection

License: MIT
GitLab Repo

Python-пакет для обробки тексту, включаючи підрахунок унікальних символів,підтримує обробку даних черех командний рядок.


Зміст


Посилання проекту


Встановлення

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}")

Документація

  1. Відкрий Python-інтерпретатор:
python
  1. Імпортуй функцію та використовуй 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

Тестування

  1. Клонувати репозиторій:
git clone https://git.foxminded.ua/liliia-shpytsia-mentoring/task-5-packaging.git 
cd task-5-packaging
  1. Встановити залежності для розробки:
pip install -r requirements.txt
  1. Запустити тести:
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

Пошук проблем


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

my_collection-0.1.3.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

my_collection-0.1.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

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

Hashes for my_collection-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f636886ff97741e58c2f6140f1a86b4b9cf2c57f58430e641cf3f29b374d0082
MD5 f6d8a9a7492b6ffe944b64c61cb0d3f2
BLAKE2b-256 f0062fd5fdaacc5a79d4086b5e27ce5c7805c9d05833c9742f3f28238e079ba9

See more details on using hashes here.

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

Hashes for my_collection-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb5dcd84bac75f2e6e79c7925ade8ef57c9392dbf36104e9ca12314c386ae71
MD5 633e9ebe59c2730f5c7b3f688e1188ee
BLAKE2b-256 ba3c9ccbe7b80b790d7af29d6563c0ea9fedae692b58fb5ccd581e8d017ae994

See more details on using hashes here.

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