I'm developing a larger application using Python on MacOS, with plans to deploy it on a Linux system later. Currently, I've created a folder in my project directory for logs and other files, but after compiling the application, I noticed I no longer have that project folder. I'm curious about the standard practices for storing project files and whether I should use a library or just write a simple script to define the paths and create them if they don't exist.
4 Answers
It's much better to use a library for this kind of thing. It handles many tricky aspects that you'd otherwise have to manage manually.
Since you plan to deploy on Linux, consider writing logs to standard output. If you set your application up as a systemd service, its output will be captured in the system logs, which you can access using `journalctl`.
You don't necessarily need to save logs inside your project directory; you can choose any location, even a root folder. Generally, for deployable applications, it's common to avoid writing files directly. Instead, many apps log data to databases or expose it through API endpoints.
For project code, pushing it to a remote Git repository like GitHub or GitLab is the way to go. As for application data, using a database like PostgreSQL or SQLite is advisable. PostgreSQL works well for cloud applications, while SQLite is great for local setups. Both options come with Python libraries for easy integration.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically