#python python... PYTHON 🔛 🚀
11 subscribers
912 photos
7 videos
158 files
1.54K links
Download Telegram
Forwarded from Python Daily
Monday Daily Thread: Project ideas!

# Weekly Thread: Project Ideas 💡

Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.

## How it Works:

1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.

## Guidelines:

* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.

# Example Submissions:

## Project Idea: Chatbot

**Difficulty**: Intermediate

**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar

**Description**: Create a chatbot that can answer FAQs for a website.

**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)

# Project Idea: Weather Dashboard

**Difficulty**: Beginner

**Tech Stack**: HTML, CSS, JavaScript, API

**Description**: Build a dashboard that displays real-time weather information using a weather API.

**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)

## Project Idea: File Organizer

**Difficulty**: Beginner

**Tech Stack**: Python, File I/O

**Description**: Create a script that organizes files in a directory into sub-folders based on file type.

**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)

Let's help each other grow. Happy

/r/Python
https://redd.it/1goetbj
Forwarded from Python Daily
pipe-operator: Elixir's pipe operator in Python

TLDR: pipe-operator is an open-source python package which brings similar features to elixir's |> tap then to Python, with 2 vastly different implementations. Because why not :D

\---

Hey there! Thought it might be of interest to some of you! I come from Python but lately I've been working with Elixir (mostly at work) and came to really enjoy its pipe operator |> and its related features like tap, then, and shortcut syntaxes. So I thought to myself: "could be fun to bring this to python". So I did, and the **pipe-operator** project was born.

# What My Project Does

It provides similar features to elixir |>, allowing you to chain operations without using intermediary variables. Through 2 very different implementations, you can pass the result of the previous expression as the first parameter of the next one.

As for those 2 very different implementation, they are:

A pythonic class-based one, which is fully compatible with linters and type-checkers
And an elixir-like one, with a syntax resembling elixir's, which will drive you linters mad

# Target Audience

I don't think anyone would be using this in production/work projects, but it can be a fun tool for developers' side projects who enjoy functional programming.

# Quick demo

Python implementation:



/r/Python
https://redd.it/1go69ha
Forwarded from Python Daily
uv after 0.5.0 - might be worth replacing Poetry/pyenv/pipx

uv is rapidly maturing as an open-source tool for Python project management, reaching a full-featured capabilities with recent versions 0.4.27 and 0.5.0, making it a strong alternative to Poetry, pyenv, and pipx. However, concerns exist over its long-term stability and licensing, given Astral's venture funding position.

https://open.substack.com/pub/martynassubonis/p/python-project-management-primer-a55

/r/Python
https://redd.it/1gqh4te
Forwarded from Python Daily
Make your Github profile more attractive as a Python Developer

What My Project Does:

This project automates the process of showcasing detailed analytics and visual insights of your Python repositories on your GitHub profile using GitHub Actions. Once set up, it gathers and updates key statistics on every push, appending the latest information to the bottom of your README without disrupting existing content. The visualizations are compiled into a gif, ensuring that your profile remains clean and visually engaging.

With this tool, you can automatically analyze, generate, and display visuals for the following metrics:

\- Repository breakdown by commits and lines of Python code

\- Heatmap of commit activity by day and time

\- Word cloud of commit messages

\- File type distribution across repositories

\- Libraries used in each repository

\- Construct counts (including loops, classes, control flow statements, async functions, etc.)

\- Highlights of the most recent closed PRs and commits

By implementing these automated insights, your profile stays up-to-date with real-time data, giving visitors a dynamic view of your work without any manual effort.

\---

Target Audience:

This tool is designed for Python developers and GitHub users who want to showcase their project activity, code structure, and commit history visually on their profile. It’s ideal for those who value continuous profile enhancement with minimal maintenance, making it useful for developers

/r/Python
https://redd.it/1gr4qkw
Forwarded from Python Daily
Dispatchery: Type-aware, multi-arg function dispatch for complex and nested Python types

Links: [Github](https://github.com/bolaft/dispatchery/), [PyPI](https://pypi.org/project/dispatchery/)

**What it does:**

*dispatchery* is a lightweight Python package for function dispatching inspired by the standard *singledispatch* decorator, but with support for complex, nested, parameterized types, like for example *tuple[str, dict[str, int | float]]*.

**Comparison**:

Unlike *singledispatch*, *dispatchery* can dispatch based on:

- Generic parameterized types (e.g. *list[int]*)
- Nested types (e.g. *tuple[str, dict[str, int | float]]*)
- Union types (e.g. *int | str* or *Union[int, str]*)
- Multiple arg and kwarg values, not just the first one

**Target Audience:**

Python developers who don't like having a bunch of *if isinstance* checks everywhere in their code.

**Example :**

from dispatchery import dispatchery

@dispatchery
def my_func(value):
return "Standard stuff."

@my_func.register(list[str])
def _(value):
return "Strings!"

@my_func.register(list[int] | list[float])
def _(value):
return "Numbers!"

@my_func.register(str, int | float, option=str)
def _(value1, value2, option):
return "Two values and a kwarg!"



/r/Python
https://redd.it/1grszm2
Forwarded from Data Whisperer
Lineage для кода: Визуализация зависимостей в Python-проектах

В мире данных мы привыкли к инструментам вроде dbt и datahub, которые отлично справляются с построением графов зависимостей для таблиц в базах данных. Но что делать, когда нужно разобраться в структуре кодовой базы?

Проблема

Недавно я столкнулся с задачей анализа старого проекта, где:

- Множество взаимосвязанных модулей
- Отсутствие тестов
- Сложная логика взаимодействия компонентов

Решение: pydeps 🛠

В поисках инструмента для визуализации зависимостей я обнаружил pydeps - Python-модуль, который:

- Анализирует структуру проекта
- Строит наглядный граф зависимостей
- Экспортирует результат в SVG-формат

Преимущества использования

- Быстрое понимание архитектуры проекта
- Визуальное отслеживание зависимостей
- Помощь в рефакторинге и написании тестов

💡 Этот инструмент особенно полезен при работе с legacy-кодом или при погружении в новый проект.


pip install pydeps
pydeps your_project_path
Декоратор override

@override используется для переопределения методов в классах-наследниках. Он позволяет указать, что метод в подклассе переопределяет метод базового класса.

Это может быть полезно для:

— Повышения читабельности кода, так как сразу видно, какие методы переопределены.

— Выявления ошибок: если имя метода в дочернем классе не совпадает с именем в родительском, будет выдана ошибка.

— Проверки типов аргументов: декоратор гарантирует, что типы аргументов совпадают с базовым методом.

#python #decorators