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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #402 · 22 дек.

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

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

Пребарај: #odoo

当前筛选 #odoo清除筛选
GitHub Trends

@githubtrending · Post #14646 · 30.04.2025 г., 11:30

#python#erp#hacktoberfest#odoo#python These tools are for Odoo administrators to improve technical features. They include modules like **attachment queue**, **auto backup**, and **audit log**, which help manage files, secure data, and track changes. Other modules like **sentry** and **server action logging** help monitor errors and server actions. These tools make Odoo more efficient and easier to manage, providing benefits like better data security and improved system performance. https://github.com/OCA/server-tools

GitHub Trends

@githubtrending · Post #15378 · 31.12.2025 г., 11:30

#javascript#erp#hacktoberfest#odoo#python OCA/web offers 40+ free addons for Odoo 18 web interface, like dark mode, responsive design, custom calendars, notifications, charts, and tree view improvements with maintainers listed. All pass pre-commit, build, and translation checks, licensed AGPL-3.0 or per module. You gain easy UI enhancements to customize Odoo backend faster, boost usability on mobile/touchscreens, save time on exports/filters, and improve productivity without coding from scratch. https://github.com/OCA/web

GitHub Trends

@githubtrending · Post #14951 · 12.07.2025 г., 12:00

#python#apps#business#erp#management#odoo#odoo_apps#python Odoo is a powerful, open-source business software that combines many tools like CRM, website building, eCommerce, inventory, accounting, and more into one easy-to-use platform. You can pick and choose only the apps you need, making it flexible and cost-effective. It helps you manage all parts of your business in one place, improving efficiency, reducing errors, and giving you real-time data for better decisions. Its user-friendly design means your team can learn it quickly, and it grows with your business as you add more features. This saves you time, cuts costs, and boosts productivity. https://github.com/odoo/odoo