Zen of Python
Полный Дзен Пайтона в одном канале Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels Сайт: https://tprg.ru/site Регистрация в перечне РКН: https://tprg.ru/xZOL
Show more📈 Analytical overview of Telegram channel Zen of Python
Channel Zen of Python (@zen_of_python) in the Russian language segment is an active participant. Currently, the community unites 19 291 subscribers, ranking 6 987 in the Technologies & Applications category and 35 120 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 19 291 subscribers.
According to the latest data from 06 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 37 over the last 30 days and by -4 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 12.72%. Within the first 24 hours after publication, content typically collects 5.70% reactions from the total number of subscribers.
- Post reach: On average, each post receives 2 453 views. Within the first day, a publication typically gains 1 099 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 9.
- Thematic interests: Content is focused on key topics such as github, rust, pip, api, install.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Полный Дзен Пайтона в одном канале
Разместить рекламу: @tproger_sales_bot
Правила общения: https://tprg.ru/rules
Другие каналы: @tproger_channels
Сайт: https://tprg.ru/site
Регистрация в перечне РКН: https://tprg.ru/xZOL”
Thanks to the high frequency of updates (latest data received on 08 June, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
django.db.models.CompositePrimaryKey;
— Упрощенное переопределение BoundField на уровне формы, поля или проекта.
Про CompositePrimaryKey
CompositePrimaryKey позволяет создавать первичные ключи, состоящие из нескольких полей, что особенно полезно при моделировании связей многие-ко-многим.
from django.db import models
class Product(models.Model):
name = models.CharField(max_length=100)
class Order(models.Model):
reference = models.CharField(max_length=20, primary_key=True)
class OrderLineItem(models.Model):
pk = models.CompositePrimaryKey("product_id", "order_id")
product = models.ForeignKey(Product, on_delete=models.CASCADE)
order = models.ForeignKey(Order, on_delete=models.CASCADE)
quantity = models.IntegerField()
В этом примере модель OrderLineItem использует составной первичный ключ, состоящий из полей product_id и order_id. Это гарантирует уникальность каждой комбинации продукта и заказа. Ранее для достижения подобного поведения приходилось использовать дополнительные настройки или сторонние библиотеки.
#django #факт
@zen_of_pythonimport argparse
import asyncio
import json
import os
import textwrap
import httpx
async def fetch_word_data(word: str) -> list:
"""Получает данные слова из API словаря."""
url = f"https://api.dictionaryapi.dev/api/v2/entries/en/{word}"
async with httpx.AsyncClient() as client:
response = await client.get(url)
response.raise_for_status()
return response.json()
async def main(word: str):
"""Получает и выводит определения для данного слова."""
data = await fetch_word_data(word)
if data:
print(f"Определения для '{word}':")
for entry in data:
for meaning in entry.get("meanings", []):
part_of_speech = meaning.get("partOfSpeech")
definitions = meaning.get("definitions", [])
if part_of_speech and definitions:
print(f"\n{part_of_speech}:")
for definition_data in definitions:
definition = definition_data.get("definition")
if definition:
print(f"- {definition}")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Получить определения слова.")
parser.add_argument("word", type=str, help="Слово для поиска.")
args = parser.parse_args()
asyncio.run(main(args.word))
Чтобы добавить зависимость httpx в наш скрипт, мы можем использовать команду uv:
uv add --script wordlookup.py httpx
После выполнения этой команды в верхней части скрипта будут добавлены метаданные о зависимостях, что позволит uv автоматически управлять установкой необходимых библиотек при запуске скрипта.
Запускаем скрипт:
uv run wordlookup.py <слово>
При первом запуске uv создаст изолированную виртуальную среду и установит все необходимые зависимости. В дальнейшем uv будет использовать уже созданную среду.
#факт
@zen_of_python
Available now! Telegram Research 2025 — the year's key insights 
