TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #421 · 23 мар.

Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое. Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению. И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make. just - это не система сборки как make, это именно исполнитель команд! Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎 ⭐️Что умеет just: ✅ Автодокументирование команд Не нужно делать отдельную команду с докой, просто добавь комментарий # команда сборки build: ... $ just --list Available recipes: build # команда сборки Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так: default: just --list Теперь просто выполняем just и получаем доку из текущего файла. ✅ Удобная работа с переменными окружения # загрузить из .env set dotenv-load # глобальная переменная export PYTHONPATH := "./src" # переменная для команды test $TESTUNG="true": pytest ✅ Передача аргументов build target: @echo 'Build {{target}}...' команда запуска $ just build dev # Build dev... ✅ Выбор интерпретатора прямо в команде Пример с инлайн-скриптом на python: system: #!/usr/bin/env python3 import platform print(platform.system()) Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки foo: #!/usr/bin/env sh for file in ls .; do echo $file done ✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный [working-directory: 'backend'] build: docker compose build Также можно задать рабочую директорию глобально Там еще много интересного: - поддержка функций - автокомплиты и интеграции - экспрешены - алиасы команд - группировка команд - альтернативы команды под разные ОС - импорт других just-файлов - цветной вывод - ... и другие штуковины! Так что вперёд - ➡️ читать доку! Репозиторий: ➡️https://github.com/casey/just Статья: ➡️https://www.chicks.net/reference/file_formats/just/ ЗЫ. Кажется, на Makefile я уже не вернусь) #tools

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #memcached

当前筛选 #memcached清除筛选
djangoproject

@djangoproject · Post #411 · 13.08.2017 г., 12:08

http://sendapatch.se/projects/pylibmc/ #pylibmc is a client in Python for #memcached. It is a wrapper around TangentOrg‘s libmemcached library. The interface is intentionally made as close to python-memcached as possible, so that applications can drop-in replace it. pylibmc leverages among other things configurable behaviors, data pickling, data compression, battle-tested GIL retention, consistent distribution, and the binary memcached protocol.

djangoproject

@djangoproject · Post #410 · 13.08.2017 г., 11:53

https://pypi.python.org/pypi/python-memcached This software is a 100% Python interface to the #memcached#memory#cache daemon. It is the #client side software which allows storing values in one or more, possibly remote, memcached servers. Search google for memcached for more information.

GitHub Trends

@githubtrending · Post #14772 · 01.06.2025 г., 00:00

#cplusplus#cache#cpp#database#fibers#in_memory#in_memory_database#key_value#keydb#memcached#message_broker#multi_threading#nosql#redis#valkey#vector_search Dragonfly is a modern in-memory data store compatible with Redis and Memcached, offering up to 25 times higher throughput and better cache efficiency while using up to 80% fewer resources. It scales well with larger servers, supports many Redis commands, and features a unique, memory-efficient cache and fast snapshotting. Dragonfly provides low latency, high performance, and is easy to configure with familiar Redis options. Its design ensures atomic operations and efficient resource use, making it ideal for fast, cost-effective cloud applications needing real-time data access and high scalability. This means you get faster, more efficient caching and data handling with minimal changes to your existing setup[5][2][4]. https://github.com/dragonflydb/dragonfly