textcase — универсальная библиотека для конвертации текста между разными стилями в Python.
from textcase import case, convert
convert("ronnie-james-dio", case.PASCAL) # RonnieJamesDio
convert("RONNIE-JAMES-DIO", case.CAMEL) # ronnieJamesDio
#Python #textcase #DevTools #PythonTips #SnakeCase #CamelCase #PascalCase #KebabCase #CodeStyle #PyPI #Acronyms #OpenSource #PythonLibrary
https://github.com/zobweyt/textcase
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - zobweyt/textcase: Python library for text case conversions (https://pypi.org/project/textcase)
Python library for text case conversions (https://pypi.org/project/textcase) - zobweyt/textcase
1👎3👍2🔥2
PyFunctional — мощная Python-библиотека для работы с потоками данных в функциональном стиле!
#Python #PyFunctional #DataPipeline #FunctionalProgramming #BigData #DataProcessing #SQLite #Pandas #DataEngineering #PythonTips #OpenSource #DevTools
https://github.com/EntilZha/PyFunctional
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - EntilZha/PyFunctional: Python library for creating data pipelines with chain functional programming
Python library for creating data pipelines with chain functional programming - EntilZha/PyFunctional
1👍2🔥2
Strif — это мини-библиотека (~1000 строк кода) с набором ~30 удобных функций для работы со строками, файлами и объектами. Она не имеет зависимостей и отлично дополняет стандартную библиотеку Python.
→ atomic_output_file(), copyfile_atomic()
→ abbrev_str(), single_line(), quote_if_needed()
→ new_uid(), new_timestamped_uid()
→ hash_string(), file_mtime_hash()
→ AtomicVar
→ replace_multiple(), insert_multiple(), StringTemplate
#Python #Strif #БиблиотекиPython #Утилиты #Разработка #Файлы #Строки #UID #Hash #DevTools #PythonTips #pip #poetry #uv #OpenSource #AtomicFiles #Python13 #threadsafe
https://github.com/jlevy/strif
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - jlevy/strif: A tiny, useful Python lib of string, file, and object utilities
A tiny, useful Python lib of string, file, and object utilities - jlevy/strif
2👍2🔥1 1
Param — это легковесная библиотека Python для декларативного описания параметров с поддержкой типов, диапазонов, значений по умолчанию и документации прямо в атрибутах класса.
#Python #Param #PythonБиблиотеки #Декларативность #TypeHints #Config #PythonDev #DataViz #Holoviz #OpenSource #Программирование #PyTools #PythonTips
https://github.com/holoviz/param
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - holoviz/param: Declarative parameters for robust Python classes and a rich API for reactive programming
Declarative parameters for robust Python classes and a rich API for reactive programming - holoviz/param
2👍2 2🔥1
ahocorasick_rs — это Python-обёртка над высокопроизводительной библиотекой на Rust aho-corasick, предназначенная для поиска сразу нескольких паттернов в строке. Работает быстрее и эффективнее, чем pyahocorasick.
import ahocorasick_rs
patterns = ["hello", "world"]
text = "hello world, hello!"
ac = ahocorasick_rs.AhoCorasick(patterns)
print(ac.find_matches_as_strings(text))
# ['hello', 'world', 'hello']
#Python #Rust #AhoCorasick #Regex #StaticAnalysis #DevTools #Search #PyPI #PythonTips #OpenSource #FastCode #TextProcessing #ahocorasick_rs
https://github.com/G-Research/ahocorasick_rs
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - G-Research/ahocorasick_rs: Check for multiple patterns in a single string at the same time: a fast Aho-Corasick algorithm…
Check for multiple patterns in a single string at the same time: a fast Aho-Corasick algorithm for Python - G-Research/ahocorasick_rs
1 6⚡2🔥2 1
Curlify — это инструмент для преобразования Python-запросов (requests) в cURL-команды.
import requests, curlify
r = requests.get("http://google.ru")
print(curlify.to_curl(r.request))
# curl -X 'GET' -H 'Accept: */*' ... 'http://www.google.ru/'
#Python #Curlify #HTTP #cURL #API #DevTools #Debugging #Backend #WebDev #Requests #PythonTips #OpenSource
https://github.com/ofw/curlify
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - ofw/curlify: A library to convert python requests request object to curl command.
A library to convert python requests request object to curl command. - ofw/curlify
1 3👍1🔥1 1
Transfunctions — это Python-библиотека, которая позволяет из одного шаблона создавать синхронные, асинхронные и генераторные функции.
С помощью шаблонов вы пишете логику один раз и генерируете сразу несколько версий:
@transfunction
def template():
print('so, ', end='')
with sync_context:
print("it's just usual function!")
with async_context:
print("it's an async function!")
with generator_context:
print("it's a generator function!")
yield
template.get_usual_function()
template.get_async_function()
template.get_generator_function()
#Python #AsyncIO #Generators #CodeQuality #DevTools #Backend #Transfunctions #Refactoring #CodeReuse #PythonTips
https://github.com/pomponchik/transfunctions
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - mutating/transfunctions: Say NO to Python fragmentation on sync and async
Say NO to Python fragmentation on sync and async. Contribute to mutating/transfunctions development by creating an account on GitHub.
1🔥3👍2 2
memory_graph — это библиотека на Python для визуализации структуры объектов в памяти.
Она строит граф связей между объектами и помогает понять, как данные устроены и связаны между собой.
pip install --upgrade memory_graph
#Python #Debugging #Visualization #Graphviz #MemoryGraph #PythonTips #DeepCopy #Mutable #Immutable #LearningPython #PyDev
https://github.com/bterwijn/memory_graph
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - bterwijn/memory_graph: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep…
Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy. - bterwijn/memory_graph
1 3⚡2👍2
Subprocesslib — это лёгкая библиотека для Python, которая делает работу с subprocess такой же удобной, как с путями в pathlib.
from subprocesslib import Command
cmd = Command('tail', '-n', 5, '/var/log/syslog')
print(cmd) # tail -n 5 /var/log/syslog
cmd.run() # subprocess.run(...)
cmd.output() # subprocess.check_output(...)
cmd.spawn() # subprocess.Popen(...)
await cmd.spawn_async() # asyncio.create_subprocess_exec(...)
#Python #Asyncio #Subprocess #CLI #pathlib #DevTools #PythonTips
https://gitlab.com/chwitlabs/subprocesslib
Please open Telegram to view this post
VIEW IN TELEGRAM
GitLab
Chwitlabs / subprocesslib · GitLab
subprocesslib is a Python library that aims to be like pathlib but for the subprocess module.
1👍4⚡3
pipdeptree — это утилита, которая показывает зависимости установленных Python-пакетов в виде наглядного дерева.
Когда вы делаете pip freeze, весь список идёт плоской строкой — и невозможно понять, какой пакет от чего зависит и почему вообще оказался в окружении. Поэтому искать «кто тянет старую версию X» или разбираться с конфликтами — мучение.
pipdeptree сразу покажет, что Flask → Jinja2 → MarkupSafe и где возникает конфликт.
#Python #pipdeptree #Dependencies #Virtualenv #Pip #DevTools #PythonTips #CI #PackageManagement
https://github.com/tox-dev/pipdeptree
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - tox-dev/pipdeptree: A command line utility to display dependency tree of the installed Python packages
A command line utility to display dependency tree of the installed Python packages - tox-dev/pipdeptree