Python/ django
по всем вопросам @workakkk @itchannels_telegram - 🔥 все ит каналы @ai_machinelearning_big_data -ML @ArtificialIntelligencedl -AI @datascienceiot - 📚 @pythonlbooks РКН: clck.ru/3FmxmM
Show more📈 Analytical overview of Telegram channel Python/ django
Channel Python/ django (@pythonl) in the Russian language segment is an active participant. Currently, the community unites 58 522 subscribers, ranking 2 248 in the Technologies & Applications category and 10 314 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 58 522 subscribers.
According to the latest data from 28 October, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -164 over the last 30 days and by -36 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 6.11%. Within the first 24 hours after publication, content typically collects 3.03% reactions from the total number of subscribers.
- Post reach: On average, each post receives 3 575 views. Within the first day, a publication typically gains 1 773 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 21.
- Thematic interests: Content is focused on key topics such as github, claude, контекст, архитектура, api.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“по всем вопросам @workakkk
@itchannels_telegram - 🔥 все ит каналы
@ai_machinelearning_big_data -ML
@ArtificialIntelligencedl -AI
@datascienceiot - 📚
@pythonlbooks
РКН: clck.ru/3Fm...”
Thanks to the high frequency of updates (latest data received on 29 October, 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.
ContentSecurityPolicyMiddleware, теги csp() и настройки SECURE_CSP / SECURE_CSP_REPORT_ONLY.
- Фоновые задачи
Декоратор @task и метод enqueue() для простого запуска background jobs.
- Template Partials
Теги {% partialdef %} и {% partial %} для переиспользуемых фрагментов в шаблонах.
- Обновлённое Email API
Современный EmailMessage вместо устаревших MIME-классов.
- Другие улучшения
• В админке — иконки Font Awesome
• В auth увеличены итерации PBKDF2
• Улучшения в Postgres, GeoDjango, миграциях и др.
🔄 Изменения без обратной совместимости
- Минимальная версия MariaDB — 10.6
- Поддержка Python ≥ 3.12
- DEFAULT_AUTO_FIELD теперь всегда BigAutoField
- Удалены устаревшие API и внутренние методы
👉 Подробнее: https://docs.djangoproject.com/en/dev/releases/6.0/
#django #python
@pythonlnamedtuple
Вместо словарей можно использовать namedtuple для хранения структурированных данных, а потом легко сортировать по любому полю.
from collections import namedtuple
Name = namedtuple("Name", ["first", "last"])
names = [
Name("Mike", "Driscoll"),
Name("Zahna", "Brown"),
Name("James", "Williams")
]
# Сортировка по имени
print(sorted(names, key=lambda n: n.first))
# Сортировка по фамилии
print(sorted(names, key=lambda n: n.last))
@pythonl
from pyparsing import Word, alphas, nums, Group, OneOrMore
# Определим правило: слово + число
identifier = Word(alphas) + Word(nums)
# Парсер будет читать такие пары подряд
parser = OneOrMore(Group(identifier))
result = parser.parseString("user123 order456 item789")
print(result.asList())
# output:
python
import socket
def send_coalesced(sock, parts):
for chunk in parts[:-1]:
sock.sendall(chunk, socket.MSG_MORE)
sock.sendall(parts[-1]) финальный flush
#Вот короткий пример как делать «плохо» и «хорошо»:
import socket
sock = socket.create_connection(("localhost", 9090))
# Плохо: много маленьких пакетов
sock.sendall(b"Hello, ")
sock.sendall(b"world")
sock.sendall(b"!\n")
# Хорошо: склеили всё и отправили одним пакетом
msg = b"".join([b"Hello, ", b"world", b"!\n"])
sock.sendall(msg)
import ijson
with open("big.json", "r") as f:
for item in ijson.items(f, "records.item"):
print(item) # потоковый парсинг, не держим всё в памяти
2️⃣ HTML-парсинг с поддержкой XPath через lxml
from lxml import html
doc = html.fromstring("<div><span>Hello</span></div>")
print(doc.xpath("//span/text()")[0]) # Hello
3️⃣ Парсинг логов с регулярками и именованными группами
import re
line = '2025-08-23 12:10:45 [INFO] User=egor Action=login'
pattern = r'(?P<date>\d{4}-\d{2}-\d{2}) .* User=(?P<user>\w+) Action=(?P<action>\w+)'
m = re.search(pattern, line)
print(m.groupdict())
# {'date': '2025-08-23', 'user': 'egor', 'action': 'login'}
4️⃣ Парсинг YAML c поддержкой типов
import yaml
data = yaml.safe_load("""
user: egor
active: true
age: 30
""")
print(data) # {'user': 'egor', 'active': True, 'age': 30}
5️⃣ Парсинг бинарных данных (struct)
import struct
raw = b"\x01\x00\x00\x00\x2A\x00"
id, value = struct.unpack("<iH", raw)
print(id, value) # 1 42
6️⃣ Парсинг HTML-таблиц напрямую в DataFrame (pandas)
import pandas as pd
url = "https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)"
tables = pd.read_html(url)
print(tables[0].head()) # первая таблица со страницы
🔥 Эти методы позволяют эффективно парсить большие JSON, бинарные форматы, HTML с XPath, YAML и даже таблицы прямо в pandas.
Используйте их, если обычных инструментов уже не хватает.
class User:
def __init__(self, name):
self.name = name
# Обычный объект
u = User("Alice")
# Функция, которую хотим "подмешать"
def greet(self):
return f"Hello, {self.name}!"
# Вклиниваем метод в класс
User.greet = greet
print(u.greet()) # Hello, Alice!
⚡ Приём называется monkey patching.
Это мощный инструмент — но им надо пользоваться аккуратно, чтобы не сломать читаемость кода.
https://www.youtube.com/shorts/64-dqXJZ8RM