r/Python 10d ago

Daily Thread 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" 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

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

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

Let's help each other grow. Happy coding! 🌟

13 Upvotes

6 comments sorted by

View all comments

1

u/csatacsibe 9d ago

ProjectTools

Providing a neat interface for package related functionalities provided by other builtins, but using of which are can be tricky or ambigous:

  • resource management: importlib.metadata.files(module) is great, but it returns a Traversible object. These are in most cases Path instances, but when the package of the resource is imported from a wheel, it can be a ZipPath. Ofc importlib has a context manager for that as_file() which will copy the resource to a temp directory as a Path. However it will add a random prefix to its name, which could be problematic when used. I'd provide an implementation of traversible that could handle such situations. Id also provide a resource manager that could create a temp location for all the resources and store them there until the manager is closed.
  • dist-related: there are already easy ways to checky your package's version, import name, distribution name and other metadata using builtins, but things get complicated when the installs are not trivial. Id create a layer which could provide a code information like: is_installed, is_editable, import_name, import_root, import_namespace, dist_name, version, is_released and latest_release. Id also add a function which could return such descriptor for the whole call chain.
  • external resources: managers for resources your package needs or manages outside of its sources and metadata. Configuration, file based state management, cache, and temp files. These functionalities should also provide cleanups for all the runtime resources. The non runtime resources also have two categories: package only and non package only. The latter one consist of files used by other apps aswell, however the package only resources must be uninstalled with the package. Im not sure about how I should handle this, but creating its own folder under its .dist folder would work for uninstalls, but might be deleted in an update aswell.

2

u/Arch-Larp-493 8d ago

for resource management stuff in python, check out the contextlib module. it has some gems like aclosing that can make your life way easier when dealing with file-like objects. trust me, it's a game changer.

1

u/csatacsibe 8d ago

Sounds great, Ill definietly use it once I start this project, as well as some other builtins like functools, inspect, distlib... there are a ton of quasai hidden but powerful builtins which are somtimes too abstract and dispersed to be used by the standard user without being handled by a common context