Django or Flask?
Hey everyone. I want to build small-to-medium scale web apps, where I take some inputs from users > process them > and generate some output. I am not storing much data but I need user authentication. So I wanted to understand which framework will be best for my use case. Django or Flask? And why?
/r/flask
https://redd.it/18f3h6k
Hey everyone. I want to build small-to-medium scale web apps, where I take some inputs from users > process them > and generate some output. I am not storing much data but I need user authentication. So I wanted to understand which framework will be best for my use case. Django or Flask? And why?
/r/flask
https://redd.it/18f3h6k
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Whatever TextField i fill all TextFields in other forms get filled
I created a Flask social media app, its landing page contains two forms(post, comment) both work fine in separate pages, but the landing page when they get combined. Whatever i write in the comment form it gets posted as a post, And i noticed when there is something wrong with validation all TextFields get filled with the same content I wrote.
/r/flask
https://redd.it/18fnn6x
I created a Flask social media app, its landing page contains two forms(post, comment) both work fine in separate pages, but the landing page when they get combined. Whatever i write in the comment form it gets posted as a post, And i noticed when there is something wrong with validation all TextFields get filled with the same content I wrote.
/r/flask
https://redd.it/18fnn6x
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Help with exporting PNG.
Hello there. Hope you can help me.
I create a image file from string by using htmlwebshot, the creation of the image is okay.
The problem comes when i try to make it response for downloading, by this way:
After downloading the image can't be opened because is damaged. My image viewer says is not a PNG file, my WEB browser can open it, but my return in Flask says that is damaged.
​
How to make it response correctly?
I use this way to make response PDF files and works ok. So i supposed just change the Content-Type, and it will works.
​
Thanks for attention & answers.
/r/flask
https://redd.it/18fmqhw
Hello there. Hope you can help me.
I create a image file from string by using htmlwebshot, the creation of the image is okay.
The problem comes when i try to make it response for downloading, by this way:
download = make_response(screenshot)download.headers['Content-Type'] = "image/png"download.headers['Content-Disposition'] = "attachment"return downloadAfter downloading the image can't be opened because is damaged. My image viewer says is not a PNG file, my WEB browser can open it, but my return in Flask says that is damaged.
​
How to make it response correctly?
I use this way to make response PDF files and works ok. So i supposed just change the Content-Type, and it will works.
​
Thanks for attention & answers.
/r/flask
https://redd.it/18fmqhw
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Combining flask/fast api with django
Hi, I've been using flask for years now and also considering fast api for new projects.
But I really like the built in manager of django to manage the database. Im thinking of using django for backend user,(me). And a lighter framework like fast api for serving the production api. (They will be kept in separate server/containiers)
Is there a much better approach here?
/r/flask
https://redd.it/18emryu
Hi, I've been using flask for years now and also considering fast api for new projects.
But I really like the built in manager of django to manage the database. Im thinking of using django for backend user,(me). And a lighter framework like fast api for serving the production api. (They will be kept in separate server/containiers)
Is there a much better approach here?
/r/flask
https://redd.it/18emryu
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
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/18fh603
# 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/18fh603
YouTube
Build & Integrate your own custom chatbot to a website (Python & JavaScript)
In this fun project you learn how to build a custom chatbot in Python and then integrate this to a website using Flask and JavaScript.
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engiβ¦
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engiβ¦
Help required for hosting a flask app on a domain
Hey, so I have a Flask app built on my local which I now want to host on a domain (purchased on GoDaddy). All services that I have seen for this solution (PythonAnywhere, Linode, Ngrok etc.) are all paid. This is more of a hobby side-project so I am looking for something free. I don't need huge bandwidth or storage, just basic functionalities.
I have tried hosting this on PythonAnywhere, but it just keeps giving me username.pythonanywhere.com URLs, whereas I want it to be on my domain. Don't know what's the solution, maybe some unheard obscure library you can help with. Please recommend something worthwhile that can help.
/r/flask
https://redd.it/18ec4qk
Hey, so I have a Flask app built on my local which I now want to host on a domain (purchased on GoDaddy). All services that I have seen for this solution (PythonAnywhere, Linode, Ngrok etc.) are all paid. This is more of a hobby side-project so I am looking for something free. I don't need huge bandwidth or storage, just basic functionalities.
I have tried hosting this on PythonAnywhere, but it just keeps giving me username.pythonanywhere.com URLs, whereas I want it to be on my domain. Don't know what's the solution, maybe some unheard obscure library you can help with. Please recommend something worthwhile that can help.
/r/flask
https://redd.it/18ec4qk
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Squarify with matplotlib , nice combination to create heatmaps
​
https://preview.redd.it/1u8p2x9pqm5c1.png?width=2378&format=png&auto=webp&s=2642107c97b0dd663918b3aaaef4b69f29c8d10a
/r/Python
https://redd.it/18fq6z8
​
https://preview.redd.it/1u8p2x9pqm5c1.png?width=2378&format=png&auto=webp&s=2642107c97b0dd663918b3aaaef4b69f29c8d10a
/r/Python
https://redd.it/18fq6z8
Deploying Django with Celery
Hey,
I developed a REST API for a project I was working on with a few friends, and I ended up using Celery with Redis as the task broker. Currently, I'm deploying my development environment using Docker Compose. However, I'm exploring better and more sustainable solutions for a production environment that can scale both horizontally and vertically.
Can anyone guide me through some solutions that make sense? I understand that Kubernetes/K8s or ECS are viable options. I am currently trying to deploy this API using Kubernetes because, based on prior research, it appears to be provider-independent and aligns with my requirements. Still, I'd like to hear if any of you think there are alternative solutions that might also meet my needs with less effort.
Thanks in advance for your insights!
/r/django
https://redd.it/18fmwr2
Hey,
I developed a REST API for a project I was working on with a few friends, and I ended up using Celery with Redis as the task broker. Currently, I'm deploying my development environment using Docker Compose. However, I'm exploring better and more sustainable solutions for a production environment that can scale both horizontally and vertically.
Can anyone guide me through some solutions that make sense? I understand that Kubernetes/K8s or ECS are viable options. I am currently trying to deploy this API using Kubernetes because, based on prior research, it appears to be provider-independent and aligns with my requirements. Still, I'd like to hear if any of you think there are alternative solutions that might also meet my needs with less effort.
Thanks in advance for your insights!
/r/django
https://redd.it/18fmwr2
Reddit
From the django community on Reddit
Explore this post and more from the django community
Hatch v1.8.0 - binaries for every platform, Python management and static analysis backed by Ruff
https://hatch.pypa.io/latest/blog/2023/12/11/hatch-v180/
/r/Python
https://redd.it/18fx3f7
https://hatch.pypa.io/latest/blog/2023/12/11/hatch-v180/
/r/Python
https://redd.it/18fx3f7
hatch.pypa.io
Hatch v1.8.0 - Hatch
Hatch v1.8.0 brings Python distribution management, static analysis and formatting backed by Ruff, and binaries for every platform.
3y Django projects without using migrations
I'll need to apply several DB/code changes to a Django project that's at least 3 years old and has never used migrations for the existing models. The database used is SQL Server with SQL Management Studio. All DB changes so far have been made manually. I don't have contact with the initial developers so I don't know the reason why they did not use migrations for any of the apps they built. I do know at some point they migrated from Flask to Django, so that might be the cause.
While it seems like using migrations would be the most efficient way to maintain this project, I'm afraid to break things and make it even more complicated for other engineers touching this code as they are also not familiar with Django and migrations.
Considering how old the project is, would you still advise my team to start implementing migrations after all this time? If so, are there tutorials out there explaining how to do it safely? Please note that the DB names do not follow any of the Django default structure (appname_tablename).
I'm still a beginner in Django and DB management so apologies for any silly questions.
/r/django
https://redd.it/18fzuvh
I'll need to apply several DB/code changes to a Django project that's at least 3 years old and has never used migrations for the existing models. The database used is SQL Server with SQL Management Studio. All DB changes so far have been made manually. I don't have contact with the initial developers so I don't know the reason why they did not use migrations for any of the apps they built. I do know at some point they migrated from Flask to Django, so that might be the cause.
While it seems like using migrations would be the most efficient way to maintain this project, I'm afraid to break things and make it even more complicated for other engineers touching this code as they are also not familiar with Django and migrations.
Considering how old the project is, would you still advise my team to start implementing migrations after all this time? If so, are there tutorials out there explaining how to do it safely? Please note that the DB names do not follow any of the Django default structure (appname_tablename).
I'm still a beginner in Django and DB management so apologies for any silly questions.
/r/django
https://redd.it/18fzuvh
Reddit
From the django community on Reddit
Explore this post and more from the django community
Advanced Python/Django tutorial that ties together multiple technologies
Hi! Is there an advanced Python tutorial that ties up multiple technologies?
What I mean by "advanced" is that it does not cover just the basics (syntax, loops, data structures), but goes beyond that. You should not be able to follow this tutorial unless you have the basics.
And what I mean by "tieing up multiple technologies" is that I would be interested to see it in the form of a project. A Django web app using Celery and Rabbit MQ running inside a Docker and deployed to AWS EC2. This would encompass Python, Django, Celery, RabbitMQ, Docker, AWS, and some more advanced topics concerning project organization and architecture.
​
Is there such a tutorial, or am I daydreaming and asking for too much?
Cheers! :)
/r/Python
https://redd.it/18fs3i0
Hi! Is there an advanced Python tutorial that ties up multiple technologies?
What I mean by "advanced" is that it does not cover just the basics (syntax, loops, data structures), but goes beyond that. You should not be able to follow this tutorial unless you have the basics.
And what I mean by "tieing up multiple technologies" is that I would be interested to see it in the form of a project. A Django web app using Celery and Rabbit MQ running inside a Docker and deployed to AWS EC2. This would encompass Python, Django, Celery, RabbitMQ, Docker, AWS, and some more advanced topics concerning project organization and architecture.
​
Is there such a tutorial, or am I daydreaming and asking for too much?
Cheers! :)
/r/Python
https://redd.it/18fs3i0
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
flask_security_too fails with LiteSpeed server?
I have a Flask application that uses flask\_security\_too.
When the application is running on Gunicorn, everything is fine. However, on the production environment (public hosting) there's LiteSpeed server. While Gunicorn workers are up all the time, the LiteSpeed process is brought up only if there's a request to be handled, and it is shutdown after a few minutes of inactivity.
With this environment I've observed the following errors in application log:
2023-12-11 16:06:31,291 - CRITICAL: 500 error: Traceback (most recent call last):
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e)
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 1482, in full_dispatch_request rv = self.preprocess_request()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 1974, in preprocess_request rv = self.ensure_sync(before_func)()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_principal.py", line 477, in _on_before_request identity = loader()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_security/core.py", line 695, in _identity_loader if not isinstance(current_user._get_current_object(), AnonymousUserMixin):
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/werkzeug/local.py", line 515, in _get_current_object return get_name(local()) # type: ignore
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_login/utils.py", line 25, in <lambda> current_user = LocalProxy(lambda: _get_user())
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_login/utils.py", line 372, in
/r/flask
https://redd.it/18fydrc
I have a Flask application that uses flask\_security\_too.
When the application is running on Gunicorn, everything is fine. However, on the production environment (public hosting) there's LiteSpeed server. While Gunicorn workers are up all the time, the LiteSpeed process is brought up only if there's a request to be handled, and it is shutdown after a few minutes of inactivity.
With this environment I've observed the following errors in application log:
2023-12-11 16:06:31,291 - CRITICAL: 500 error: Traceback (most recent call last):
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e)
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 1482, in full_dispatch_request rv = self.preprocess_request()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask/app.py", line 1974, in preprocess_request rv = self.ensure_sync(before_func)()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_principal.py", line 477, in _on_before_request identity = loader()
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_security/core.py", line 695, in _identity_loader if not isinstance(current_user._get_current_object(), AnonymousUserMixin):
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/werkzeug/local.py", line 515, in _get_current_object return get_name(local()) # type: ignore
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_login/utils.py", line 25, in <lambda> current_user = LocalProxy(lambda: _get_user())
File "/home/mydomaindir/virtualenv/domains/site.mydomain.com/3.10/lib/python3.10/site-packages/flask_login/utils.py", line 372, in
/r/flask
https://redd.it/18fydrc
High school student needs advice on development
Hi, I am developing a website with django, I don't want to get super detailed for ip reasons, but things I have sort of planned but could still change right now:
* I have to extend user model to hold "score" type information for users
* I will be using websockets with django channels for real time interaction between users
* I am using mysql with aws
Obviously there is a lot of work to be done and a lot of details to be hammered out, but I am relatively inexperienced with django as I have only done like two other small somewhat beginner level projects.
I am really just looking for advice. The project that I am working on is really important to me and it does not need to be done any time soon. Is it realistic to expect that I can get this done on my own? Where should I go to look for assistance programming or to find someone else to join? I have been developing for a while, and it seems doable but like it will be a lot of work.
/r/django
https://redd.it/18gapk8
Hi, I am developing a website with django, I don't want to get super detailed for ip reasons, but things I have sort of planned but could still change right now:
* I have to extend user model to hold "score" type information for users
* I will be using websockets with django channels for real time interaction between users
* I am using mysql with aws
Obviously there is a lot of work to be done and a lot of details to be hammered out, but I am relatively inexperienced with django as I have only done like two other small somewhat beginner level projects.
I am really just looking for advice. The project that I am working on is really important to me and it does not need to be done any time soon. Is it realistic to expect that I can get this done on my own? Where should I go to look for assistance programming or to find someone else to join? I have been developing for a while, and it seems doable but like it will be a lot of work.
/r/django
https://redd.it/18gapk8
Reddit
From the django community on Reddit
Explore this post and more from the django community
Functions within getcontext()
I'm just working on the last stages of a project where I am building in the ability to capture the visitor IP address, time stamps etc etc (there will be the required privacy/GDPR/Cookie notices) which will be written to a log file.
I have the function to capture IP data, my initial thought was to put this in Middleware but I've tested it by placing it within my get\context() and it works. Is it good practice to put a function within a class view and call it from within the method, like below, so that the function is called when the page is requested? I initially thought about using some HTMX or JS to call the function from the client. Also, I'm using Wagtail, to be specific, but no difference.
This is the code structure, just wondering if this is OK, before building it out more, obviously I won't be writing to a file in production.
class HomePage(RoutablePageMixin, Page):
foo = ....
bar = ....
/r/djangolearning
https://redd.it/18g92lw
I'm just working on the last stages of a project where I am building in the ability to capture the visitor IP address, time stamps etc etc (there will be the required privacy/GDPR/Cookie notices) which will be written to a log file.
I have the function to capture IP data, my initial thought was to put this in Middleware but I've tested it by placing it within my get\context() and it works. Is it good practice to put a function within a class view and call it from within the method, like below, so that the function is called when the page is requested? I initially thought about using some HTMX or JS to call the function from the client. Also, I'm using Wagtail, to be specific, but no difference.
This is the code structure, just wondering if this is OK, before building it out more, obviously I won't be writing to a file in production.
class HomePage(RoutablePageMixin, Page):
foo = ....
bar = ....
/r/djangolearning
https://redd.it/18g92lw
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Tuesday Daily Thread: Advanced questions
# Weekly Wednesday Thread: Advanced Questions π
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/18g8a2m
# Weekly Wednesday Thread: Advanced Questions π
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/18g8a2m
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Introducing UniDep: Unified Conda and Pip Dependency Management
Hello r/python!
I'm excited to share a tool I've been working on called [**UniDep**](https://github.com/basnijholt/unidep) - a tool designed to streamline Python project dependency management by unifying Conda and Pip dependencies in a single `requirements.yaml` file. This approach allows for the creation of a unified Conda `environment.yaml`, while also integrating seamlessly with `setup.py` or `pyproject.toml`.
**Key Features of UniDep:**
- π **Unified Management**: Manage Conda and Pip dependencies together in a single file.
- βοΈ **Project Tool Integration**: Seamless integration with `pyproject.toml` and `setup.py`.
- π’ **Monorepo Support**: Merge multiple `requirements.yaml` files into one Conda environment `environment.yaml`.
- π **Platform-Specific Support**: Specify dependencies for different operating systems or architectures.
- π οΈ **Conflict Resolution**: Automated version conflict resolution for complex dependency chains.
- π **`unidep install` CLI**: A single command to install all Conda, Pip, and local dependencies.
- π§ **`pip-compile` Integration**: Generate fully pinned `requirements.txt` files from `requirements.yaml`.
**Getting Started:**
- Installation: Easily install UniDep via pip (`pip install unidep`) or Conda (`conda install -c conda-forge unidep`).
- [GitHub Repo](https://github.com/basnijholt/unidep): Check out the code, examples, and detailed documentation.
**Example:**
```yaml
name: example_environment
channels:
- conda-forge
dependencies:
- numpy # same name on conda and pip
- conda: python-graphviz # When names differ between Conda and Pip
pip: graphviz
-
/r/Python
https://redd.it/18gdt83
Hello r/python!
I'm excited to share a tool I've been working on called [**UniDep**](https://github.com/basnijholt/unidep) - a tool designed to streamline Python project dependency management by unifying Conda and Pip dependencies in a single `requirements.yaml` file. This approach allows for the creation of a unified Conda `environment.yaml`, while also integrating seamlessly with `setup.py` or `pyproject.toml`.
**Key Features of UniDep:**
- π **Unified Management**: Manage Conda and Pip dependencies together in a single file.
- βοΈ **Project Tool Integration**: Seamless integration with `pyproject.toml` and `setup.py`.
- π’ **Monorepo Support**: Merge multiple `requirements.yaml` files into one Conda environment `environment.yaml`.
- π **Platform-Specific Support**: Specify dependencies for different operating systems or architectures.
- π οΈ **Conflict Resolution**: Automated version conflict resolution for complex dependency chains.
- π **`unidep install` CLI**: A single command to install all Conda, Pip, and local dependencies.
- π§ **`pip-compile` Integration**: Generate fully pinned `requirements.txt` files from `requirements.yaml`.
**Getting Started:**
- Installation: Easily install UniDep via pip (`pip install unidep`) or Conda (`conda install -c conda-forge unidep`).
- [GitHub Repo](https://github.com/basnijholt/unidep): Check out the code, examples, and detailed documentation.
**Example:**
```yaml
name: example_environment
channels:
- conda-forge
dependencies:
- numpy # same name on conda and pip
- conda: python-graphviz # When names differ between Conda and Pip
pip: graphviz
-
/r/Python
https://redd.it/18gdt83
GitHub
GitHub - basnijholt/unidep: Single source of truth with requirements for pip and conda
Single source of truth with requirements for pip and conda - basnijholt/unidep
Thank you django for getting me through my school project
A little background, my teachers, after not teaching us any html or css or javascript or much of python or any web dev, decided that we should make a simple CRUD website as a projects. Our teacher recommended laravel, which just didn't work for my group. None of us knew php and laravel was so large it was hard to wrap our heads around it.
Eventually I fould django and flask. In the end, we decided to use django because it had enough "batteries-included" that basically everything we needed (logins, simple database, an admin
site) was already there.
And I'm so thankful that the Django docs and tutorials are amazing. I am in love with how django does it's docs. Primarily the tutorial tours most major parts of django, and the "using blank" style articles which gives super beginner friendly advice on how to use things like the user object.
The experience was so good that I actually want to do more web dev stuff after this. Though probably not as a career since I plan on being a teacher (primarily out of spite)
Also our project was ass, it looked like garbage, there was a 6 layer div nest somewhere in the html, the
/r/django
https://redd.it/18gfla3
A little background, my teachers, after not teaching us any html or css or javascript or much of python or any web dev, decided that we should make a simple CRUD website as a projects. Our teacher recommended laravel, which just didn't work for my group. None of us knew php and laravel was so large it was hard to wrap our heads around it.
Eventually I fould django and flask. In the end, we decided to use django because it had enough "batteries-included" that basically everything we needed (logins, simple database, an admin
site) was already there.
And I'm so thankful that the Django docs and tutorials are amazing. I am in love with how django does it's docs. Primarily the tutorial tours most major parts of django, and the "using blank" style articles which gives super beginner friendly advice on how to use things like the user object.
The experience was so good that I actually want to do more web dev stuff after this. Though probably not as a career since I plan on being a teacher (primarily out of spite)
Also our project was ass, it looked like garbage, there was a 6 layer div nest somewhere in the html, the
/r/django
https://redd.it/18gfla3
Reddit
From the django community on Reddit
Explore this post and more from the django community
Adding DRF to my project
I am currently using CRUD for my application using Django. I want to create an API, but unsure how to add it to my project (if that makes sense). Do I just follow the DRF documentation and add a new app to my existing project?
/r/djangolearning
https://redd.it/18gfxjs
I am currently using CRUD for my application using Django. I want to create an API, but unsure how to add it to my project (if that makes sense). Do I just follow the DRF documentation and add a new app to my existing project?
/r/djangolearning
https://redd.it/18gfxjs
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Python 3D simulation library
Hi all,
Just wondering if there is any 3d physics simulation library that i can use, im planning to simulate the drainage plane of some structures using some particles, similar to a pool table with balls if the table was inclined in a particular direction.
I have seen pymunk but it looks like it doesnt work with 3d objects..
Thanks in advance
Alwx
/r/Python
https://redd.it/18gggvi
Hi all,
Just wondering if there is any 3d physics simulation library that i can use, im planning to simulate the drainage plane of some structures using some particles, similar to a pool table with balls if the table was inclined in a particular direction.
I have seen pymunk but it looks like it doesnt work with 3d objects..
Thanks in advance
Alwx
/r/Python
https://redd.it/18gggvi
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
You watched me develop a full SaaS product as a community event. What's next?
Hey r/django,
about a month ago, I made this post. I asked whether you are interested in seeing me create a full SaaS product from idea to production deployment. You were interested! 500 of you joined the various channels.
I loved that response and delivered with a more than 6h long live stream (recording here: https://www.twitch.tv/videos/1973448363). The feedback was great, I didn't hear a single bad word.
But what now? The discord community is fairly active, posting and solving their problems. I love to see that, it's a small dream come true.
However, I want to do something like this again. A big project, maybe multiple streams long. I've also started telling a few business stories on request.
What is something you guys are curious about and would want to see?
/r/django
https://redd.it/18gm8fl
Hey r/django,
about a month ago, I made this post. I asked whether you are interested in seeing me create a full SaaS product from idea to production deployment. You were interested! 500 of you joined the various channels.
I loved that response and delivered with a more than 6h long live stream (recording here: https://www.twitch.tv/videos/1973448363). The feedback was great, I didn't hear a single bad word.
But what now? The discord community is fairly active, posting and solving their problems. I love to see that, it's a small dream come true.
However, I want to do something like this again. A big project, maybe multiple streams long. I've also started telling a few business stories on request.
What is something you guys are curious about and would want to see?
/r/django
https://redd.it/18gm8fl
Reddit
From the django community on Reddit
Explore this post and more from the django community