Considering moving from Flask-Sqlalchemy to Flask and plain Sqlalchemy: not sure how to start, or if useful
Hi all,
I wrote a free language-learning tool called Lute. I'm happy with how the project's been going, I and a bunch of other people use it.
I wrote Lute using Flask, and overall it's been very good. Recently I've been wondering if I should have tried to avoid Flask-Sqlalchemy -- I was over my head when I started, and did the best I could.
My reasons for wondering:
- when I'm running some service or domain level tests, eg., I'm connecting to the db, but I'm not using Flask. It's just python code creating objects, calling methods, etc. The tests all need an app context to execute, but that doesn't seem like it's adding anything.
- simple data crunching noscripts have to call the app initializer, and again push an app context, when really all I need is the service layer and domain objects. Unfortunately a lot of the code has stuff like "from lute.db import db" and "db.session.query() ...", etc, so the db usage is scattered around the code.
Today I hacked at changing it to plain sql alchemy, but it ended up spiralling out of my control, so I put that on ice to think a bit more.
These
/r/flask
https://redd.it/1g0ajo0
Hi all,
I wrote a free language-learning tool called Lute. I'm happy with how the project's been going, I and a bunch of other people use it.
I wrote Lute using Flask, and overall it's been very good. Recently I've been wondering if I should have tried to avoid Flask-Sqlalchemy -- I was over my head when I started, and did the best I could.
My reasons for wondering:
- when I'm running some service or domain level tests, eg., I'm connecting to the db, but I'm not using Flask. It's just python code creating objects, calling methods, etc. The tests all need an app context to execute, but that doesn't seem like it's adding anything.
- simple data crunching noscripts have to call the app initializer, and again push an app context, when really all I need is the service layer and domain objects. Unfortunately a lot of the code has stuff like "from lute.db import db" and "db.session.query() ...", etc, so the db usage is scattered around the code.
Today I hacked at changing it to plain sql alchemy, but it ended up spiralling out of my control, so I put that on ice to think a bit more.
These
/r/flask
https://redd.it/1g0ajo0
Nginx 404'ing all images.
I'm not sure if this should be in the nginx or Django Reddit, but I'll try here first. My blog is running on Docker. Initially, all images in the static files from the first set of articles I created while coding the blog were accessible to nginx. However, when I tried adding articles from the admin panel after deployment, the new images returned a 404 error. I tried debugging by checking my code and realized I didn't include a path for the media folder in the `settings.py` file. After adding that line and rebuilding the container... well, now the previously accessible images are returning a 404. I think my nginx server might not be configured correctly. *I've entered the container and verified that files are present*
Dockerfile:
# Use the official Python image from the Docker Hub
FROM python:3.11
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set the working directory
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt /app/
# Install the dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the entire project into the container
COPY . /app/
# Collect static files
RUN python manage.py collectstatic --noinput
EXPOSE 1617
# Run the Gunicorn server
CMD ["gunicorn", "redacted.wsgi:application", "--bind", "0.0.0.0:1617"\]
docker-compose:
version: '3'
services:
web:
build: .
command: gunicorn --workers
/r/django
https://redd.it/1g0cvxr
I'm not sure if this should be in the nginx or Django Reddit, but I'll try here first. My blog is running on Docker. Initially, all images in the static files from the first set of articles I created while coding the blog were accessible to nginx. However, when I tried adding articles from the admin panel after deployment, the new images returned a 404 error. I tried debugging by checking my code and realized I didn't include a path for the media folder in the `settings.py` file. After adding that line and rebuilding the container... well, now the previously accessible images are returning a 404. I think my nginx server might not be configured correctly. *I've entered the container and verified that files are present*
Dockerfile:
# Use the official Python image from the Docker Hub
FROM python:3.11
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set the working directory
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt /app/
# Install the dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the entire project into the container
COPY . /app/
# Collect static files
RUN python manage.py collectstatic --noinput
EXPOSE 1617
# Run the Gunicorn server
CMD ["gunicorn", "redacted.wsgi:application", "--bind", "0.0.0.0:1617"\]
docker-compose:
version: '3'
services:
web:
build: .
command: gunicorn --workers
/r/django
https://redd.it/1g0cvxr
Reddit
From the django community on Reddit
Explore this post and more from the django community
How do I make a number column that automatically increases but only for a group of three column?
The model:
class Bunny(models.Model):
lear = models.CharField(maxlength=10)
rear = models.CharField(maxlength=10)
sex = models.CharField(maxlength=1, choices=[('M', 'Male'), ('F', 'Female')])
tattooedon = models.DateTimeField(null=True)
CID = models.ForeignKey(Club, ondelete=models.PROTECT)
UIDowner = models.ForeignKey("authservice.User", ondelete=models.PROTECT)
TID = models.ForeignKey("coverslip.Throw", ondelete=models.PROTECT, null=True, blank=True )
RID = models.ForeignKey("bunnies.Race", ondelete=models.PROTECT)
COLID = models.ForeignKey("bunnies.Color", ondelete=models.PROTECT, null=True)
UIDtattoomaster = models.ForeignKey("authservice.User", ondelete=models.PROTECT, relatedname='tattooedbunnies')
serialnumber = models.PositiveIntegerField(null=True, blank=True)
def str(self):
return self.lear + " / " + self.rear
class Meta:
pass
/r/django
https://redd.it/1g0gjp8
The model:
class Bunny(models.Model):
lear = models.CharField(maxlength=10)
rear = models.CharField(maxlength=10)
sex = models.CharField(maxlength=1, choices=[('M', 'Male'), ('F', 'Female')])
tattooedon = models.DateTimeField(null=True)
CID = models.ForeignKey(Club, ondelete=models.PROTECT)
UIDowner = models.ForeignKey("authservice.User", ondelete=models.PROTECT)
TID = models.ForeignKey("coverslip.Throw", ondelete=models.PROTECT, null=True, blank=True )
RID = models.ForeignKey("bunnies.Race", ondelete=models.PROTECT)
COLID = models.ForeignKey("bunnies.Color", ondelete=models.PROTECT, null=True)
UIDtattoomaster = models.ForeignKey("authservice.User", ondelete=models.PROTECT, relatedname='tattooedbunnies')
serialnumber = models.PositiveIntegerField(null=True, blank=True)
def str(self):
return self.lear + " / " + self.rear
class Meta:
pass
/r/django
https://redd.it/1g0gjp8
Reddit
From the django community on Reddit
Explore this post and more from the django community
PEP 735 Dependency Groups is accepted
https://peps.python.org/pep-0735/
https://discuss.python.org/t/pep-735-dependency-groups-in-pyproject-toml/39233/312
> This PEP specifies a mechanism for storing package requirements in pyproject.toml files such that they are not included in any built distribution of the project.
>
> This is suitable for creating named groups of dependencies, similar to requirements.txt files, which launchers, IDEs, and other tools can find and identify by name.
/r/Python
https://redd.it/1g0iqfr
https://peps.python.org/pep-0735/
https://discuss.python.org/t/pep-735-dependency-groups-in-pyproject-toml/39233/312
> This PEP specifies a mechanism for storing package requirements in pyproject.toml files such that they are not included in any built distribution of the project.
>
> This is suitable for creating named groups of dependencies, similar to requirements.txt files, which launchers, IDEs, and other tools can find and identify by name.
/r/Python
https://redd.it/1g0iqfr
Python Enhancement Proposals (PEPs)
PEP 735 – Dependency Groups in pyproject.toml | peps.python.org
This PEP specifies a mechanism for storing package requirements in pyproject.toml files such that they are not included in any built distribution of the project.
What I Learned from Making the Python Back End for My New Webapp
I learned a lot from making this, and think a lot of it would be interesting to others making web apps in Python:
https://youtubetrannoscriptoptimizer.com/blog/02\_what\_i\_learned\_making\_the\_python\_backend\_for\_yto
/r/Python
https://redd.it/1g0jybv
I learned a lot from making this, and think a lot of it would be interesting to others making web apps in Python:
https://youtubetrannoscriptoptimizer.com/blog/02\_what\_i\_learned\_making\_the\_python\_backend\_for\_yto
/r/Python
https://redd.it/1g0jybv
Youtubetrannoscriptoptimizer
What I Learned from Making the Python Backend for YouTube Trannoscript Optimizer
An in-depth look at the technical challenges and solutions in creating the FastAPI backend for YouTubeTrannoscriptOptimizer.com, a powerful tool for transforming YouTube content into polished written documents and interactive quizzes.
R nGPT: Normalized Transformer with Representation Learning on the Hypersphere
Paper: https://arxiv.org/pdf/2410.01131
Abstract:
>We propose a novel neural network architecture, the normalized Transformer (nGPT) with representation learning on the hypersphere. In nGPT, all vectors forming the embeddings, MLP, attention matrices and hidden states are unit norm normalized. The input stream of tokens travels on the surface of a hypersphere, with each layer contributing a displacement towards the target output predictions. These displacements are defined by the MLP and attention blocks, whose vector components also reside on the same hypersphere. Experiments show that nGPT learns much faster, reducing the number of training steps required to achieve the same accuracy by a factor of 4 to 20, depending on the sequence length.
Highlights:
>Our key contributions are as follows:
Optimization of network parameters on the hypersphere We propose to normalize all vectors forming the embedding dimensions of network matrices to lie on a unit norm hypersphere. This allows us to view matrix-vector multiplications as dot products representing cosine similarities bounded in [-1,1\]. The normalization renders weight decay unnecessary.
Normalized Transformer as a variable-metric optimizer on the hypersphere The normalized Transformer itself performs a multi-step optimization (two steps per layer) on a hypersphere, where each step of the attention
/r/MachineLearning
https://redd.it/1g0lnij
Paper: https://arxiv.org/pdf/2410.01131
Abstract:
>We propose a novel neural network architecture, the normalized Transformer (nGPT) with representation learning on the hypersphere. In nGPT, all vectors forming the embeddings, MLP, attention matrices and hidden states are unit norm normalized. The input stream of tokens travels on the surface of a hypersphere, with each layer contributing a displacement towards the target output predictions. These displacements are defined by the MLP and attention blocks, whose vector components also reside on the same hypersphere. Experiments show that nGPT learns much faster, reducing the number of training steps required to achieve the same accuracy by a factor of 4 to 20, depending on the sequence length.
Highlights:
>Our key contributions are as follows:
Optimization of network parameters on the hypersphere We propose to normalize all vectors forming the embedding dimensions of network matrices to lie on a unit norm hypersphere. This allows us to view matrix-vector multiplications as dot products representing cosine similarities bounded in [-1,1\]. The normalization renders weight decay unnecessary.
Normalized Transformer as a variable-metric optimizer on the hypersphere The normalized Transformer itself performs a multi-step optimization (two steps per layer) on a hypersphere, where each step of the attention
/r/MachineLearning
https://redd.it/1g0lnij
PSA: If you're starting a new project, try astral/uv!
It's really amazing, complex dependencies are resolved in mere miliseconds, it manages interpreters for you and it handles dev-dependencies and tools as good if not better than poetry. You are missing out on a lot of convenience if you don't try it. check it out here.
Not affiliated or involved in any way btw, just been using it for a few months and am still blown out of the water by how amazing uv and ruff are.
/r/Python
https://redd.it/1g0imjf
It's really amazing, complex dependencies are resolved in mere miliseconds, it manages interpreters for you and it handles dev-dependencies and tools as good if not better than poetry. You are missing out on a lot of convenience if you don't try it. check it out here.
Not affiliated or involved in any way btw, just been using it for a few months and am still blown out of the water by how amazing uv and ruff are.
/r/Python
https://redd.it/1g0imjf
GitHub
GitHub - astral-sh/uv: An extremely fast Python package and project manager, written in Rust.
An extremely fast Python package and project manager, written in Rust. - astral-sh/uv
Introducing Eventum ASGI, a Python framework simplifying the creation of WebSocket-based apps
# Introduction:
I'm excited to present my first Python framework. I would appreciate any feedback you could give me, it's my first project and it's still in active development.
# What My Project Does:
The project is based on ASGI protocol, the key idea is to simplify the usage of WebSockets which isn't a strong side of most popular frameworks. The framework introduces some new approaches to handling WebSockets, most of the time you'll work with a
Another significant difference from the common approach is the connection lifecycle in the app.
1. You create a
2. You create an
To explain how everything works behind the scenes:
1. A client sends a handshake to switch protocols and for a server to either accept or reject a connection.
2. Once accepted, the connection gets into a loop where it's constantly checking
/r/Python
https://redd.it/1g0px5z
# Introduction:
I'm excited to present my first Python framework. I would appreciate any feedback you could give me, it's my first project and it's still in active development.
# What My Project Does:
The project is based on ASGI protocol, the key idea is to simplify the usage of WebSockets which isn't a strong side of most popular frameworks. The framework introduces some new approaches to handling WebSockets, most of the time you'll work with a
WSConnection class which is one of the keystones of the framework. Another significant difference from the common approach is the connection lifecycle in the app.
1. You create a
handshake_route, which is only responsible for handling the initial request. It expects to get a handshake request to switch protocols.2. You create an
event. To make it easier to understand you can also consider it to be a route, just for messages sent via an established connection. It expects a JSON which must contain an "event" field in it.To explain how everything works behind the scenes:
1. A client sends a handshake to switch protocols and for a server to either accept or reject a connection.
2. Once accepted, the connection gets into a loop where it's constantly checking
/r/Python
https://redd.it/1g0px5z
Reddit
From the Python community on Reddit: Introducing Eventum ASGI, a Python framework simplifying the creation of WebSocket-based apps
Explore this post and more from the Python community
Generating nice iPython notebooks diffs with Git pre-commit hooks
https://preview.redd.it/u4e94ccihztd1.png?width=897&format=png&auto=webp&s=28a6d23da591912c6aa712556731798ddbfa9c7c
I like to use iPython notebooks to store experimental code and debugging results, but it's a pain to use version control to look at them.
So I wrote some pre-commit hooks that makes it easy to diff iPython notebooks in Git. It auto-generates a copy of the file with just the Python code, so that you can just inspect code changes.
I wrote a bit more about why here, along with instructions on how to use them: https://blog.moonglow.ai/diffing-ipython-notebook-code-in-git/
And the git repo for the hooks (MIT-licensed) is here: https://github.com/moonglow-ai/pre-commit-hooks
/r/IPython
https://redd.it/1g0rjpo
https://preview.redd.it/u4e94ccihztd1.png?width=897&format=png&auto=webp&s=28a6d23da591912c6aa712556731798ddbfa9c7c
I like to use iPython notebooks to store experimental code and debugging results, but it's a pain to use version control to look at them.
So I wrote some pre-commit hooks that makes it easy to diff iPython notebooks in Git. It auto-generates a copy of the file with just the Python code, so that you can just inspect code changes.
I wrote a bit more about why here, along with instructions on how to use them: https://blog.moonglow.ai/diffing-ipython-notebook-code-in-git/
And the git repo for the hooks (MIT-licensed) is here: https://github.com/moonglow-ai/pre-commit-hooks
/r/IPython
https://redd.it/1g0rjpo
Deploying (Multiple) Django Apps to a Single Server with Kamal 2
https://www.coryzue.com/writing/kamal-django/
/r/django
https://redd.it/1g0i0nl
https://www.coryzue.com/writing/kamal-django/
/r/django
https://redd.it/1g0i0nl
Coryzue
Deploying (Multiple) Django Apps to a Single Server with Kamal 2
Shared servers for the win!
In a API Rest World, what do you choose? Blueprints or Flask-Views? Why?
/r/flask
https://redd.it/1g0sl6t
/r/flask
https://redd.it/1g0sl6t
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Returning dynamic form elements when invalid
I have a potentially 3 level form that can have elements added to it (either forms or formsets).
If any form (or formset) is invalid during the post, I'd like to be able to return the whole form (including dynamic content) to the user for correction before resubmission.
The second level is pretty straight forward as that is just a formset that can be rendered beneath the base form.
However, the third level is where I'm having difficulty as that is a formset belonging to a form of a formset.
The below code snippet shows the issue:
monthly_formset = MonthlyActivityDaysFormset(request.POST, prefix='m')
if monthly_formset.is_valid():
for monthly_form in monthly_formset:
##DO STUFF
if monthly_form.prefix+'-diff_times_per_month_monthly' is not None:
diff_times_formset = DifferentTimesFormset(request.POST, prefix=monthly_form.prefix+'-dt')
if diff_times_formset.is_valid():
for diff_times in diff_times_formset:
/r/djangolearning
https://redd.it/1g10hqo
I have a potentially 3 level form that can have elements added to it (either forms or formsets).
If any form (or formset) is invalid during the post, I'd like to be able to return the whole form (including dynamic content) to the user for correction before resubmission.
The second level is pretty straight forward as that is just a formset that can be rendered beneath the base form.
However, the third level is where I'm having difficulty as that is a formset belonging to a form of a formset.
The below code snippet shows the issue:
monthly_formset = MonthlyActivityDaysFormset(request.POST, prefix='m')
if monthly_formset.is_valid():
for monthly_form in monthly_formset:
##DO STUFF
if monthly_form.prefix+'-diff_times_per_month_monthly' is not None:
diff_times_formset = DifferentTimesFormset(request.POST, prefix=monthly_form.prefix+'-dt')
if diff_times_formset.is_valid():
for diff_times in diff_times_formset:
/r/djangolearning
https://redd.it/1g10hqo
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1g0ww31
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1g0ww31
Redditinc
Reddit Rules
Reddit Rules - Reddit
How to connect MySQL database to flask app
Very begginer in flask and MySQL in general and I’ve been having trouble in connecting my database to the Flask app. It’s a very simple login page where the user id and authentication key per user is already inside the database, so the program has to confirm whether or not the inputted user id and authentication key are inaide the database to allow the user to access their dashboars. I’ve mostly been relying on youtube but I can’t seem to find the right one I’m looking for.
If anyone could suggest any references or suggestions that would be very much appreciated.
/r/flask
https://redd.it/1g14umt
Very begginer in flask and MySQL in general and I’ve been having trouble in connecting my database to the Flask app. It’s a very simple login page where the user id and authentication key per user is already inside the database, so the program has to confirm whether or not the inputted user id and authentication key are inaide the database to allow the user to access their dashboars. I’ve mostly been relying on youtube but I can’t seem to find the right one I’m looking for.
If anyone could suggest any references or suggestions that would be very much appreciated.
/r/flask
https://redd.it/1g14umt
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Pyinstrument v5.0 - flamegraphs for Python!
Hi reddit! I've been hard at work on a new pyinstrument feature that I'm really excited to show off. It's a completely new HTML renderer that lets you see visually exactly what happened as the program was running.
What it does First, some context: Pyinstrument is a statistical profiler for Python. That means you can activate it when you're running your code, and pyinstrument will record what happens periodically, and at the end, give you a report that tells you where the time was spent.
Target Audience Anyone wondering if their Python program could be faster! Not only is it useful from a performance perspective, it's also a nice way to understand what's going on when a program runs.
Comparison If you've used profilers like cProfile before, pyinstrument aims to be a more user-friendly, intuitive alternative to that. It's also a statistical profiler, it only samples your program periodically, so it shouldn't slow the program down too much.
So, what's new? Up until now, the output has been some form of call stack. That's great to identify the parts of code that are taking the most time. But it can leave some information missing - what's the pattern of the code execution? What order
/r/Python
https://redd.it/1g1az6i
Hi reddit! I've been hard at work on a new pyinstrument feature that I'm really excited to show off. It's a completely new HTML renderer that lets you see visually exactly what happened as the program was running.
What it does First, some context: Pyinstrument is a statistical profiler for Python. That means you can activate it when you're running your code, and pyinstrument will record what happens periodically, and at the end, give you a report that tells you where the time was spent.
Target Audience Anyone wondering if their Python program could be faster! Not only is it useful from a performance perspective, it's also a nice way to understand what's going on when a program runs.
Comparison If you've used profilers like cProfile before, pyinstrument aims to be a more user-friendly, intuitive alternative to that. It's also a statistical profiler, it only samples your program periodically, so it shouldn't slow the program down too much.
So, what's new? Up until now, the output has been some form of call stack. That's great to identify the parts of code that are taking the most time. But it can leave some information missing - what's the pattern of the code execution? What order
/r/Python
https://redd.it/1g1az6i
GitHub
GitHub - joerick/pyinstrument: 🚴 Call stack profiler for Python. Shows you why your code is slow!
🚴 Call stack profiler for Python. Shows you why your code is slow! - joerick/pyinstrument
Tkinter based package for sending GUI alerts / notifications, named tk-alert
Hi everyone, I have been thinking to post here for some time and decided to do so. I was hesitant as this is my first time working on a python package and the project is far from being finished.
Long story short, I have been working on a personal app using Tkinter and I needed a way to send error notifications to users, could not find something really easy to install and use so I started working on creating my own self-contained package.
1. What my project does.
Sends GUI notifications for users meant for information, warnings or errors, using Tkinter.
My design philosophy was that the package should be simple and ready to use out-of-the-box, but should have more complex design time features for people that want a specific look on their app (this part is work in progress)
So far I did not have time to continue work on this due to multiple reasons, but as the cold season approaches I am looking forward to get on with some tasks from my to-do list.
2. Target audience.
Tkinter devs, not ready for production yet.
3. Comparison.
What I want this package to be set apart by is the ease of set-up and use +
/r/Python
https://redd.it/1g17jeq
Hi everyone, I have been thinking to post here for some time and decided to do so. I was hesitant as this is my first time working on a python package and the project is far from being finished.
Long story short, I have been working on a personal app using Tkinter and I needed a way to send error notifications to users, could not find something really easy to install and use so I started working on creating my own self-contained package.
1. What my project does.
Sends GUI notifications for users meant for information, warnings or errors, using Tkinter.
My design philosophy was that the package should be simple and ready to use out-of-the-box, but should have more complex design time features for people that want a specific look on their app (this part is work in progress)
So far I did not have time to continue work on this due to multiple reasons, but as the cold season approaches I am looking forward to get on with some tasks from my to-do list.
2. Target audience.
Tkinter devs, not ready for production yet.
3. Comparison.
What I want this package to be set apart by is the ease of set-up and use +
/r/Python
https://redd.it/1g17jeq
Reddit
From the Python community on Reddit: Tkinter based package for sending GUI alerts / notifications, named tk-alert
Explore this post and more from the Python community
Thoughts on hosting
Hello!
I've got experience with hosting wagtail/Django on heroku, I liked how easy it is to set things up and add postgres db for example.
Do you have any recommendations based on ease of use and cost? :) thanks
/r/django
https://redd.it/1g186wy
Hello!
I've got experience with hosting wagtail/Django on heroku, I liked how easy it is to set things up and add postgres db for example.
Do you have any recommendations based on ease of use and cost? :) thanks
/r/django
https://redd.it/1g186wy
Reddit
From the django community on Reddit
Explore this post and more from the django community
Random context generator - RaCoGen (provisional name)
What my project does:
RaCoGen is a simple program that generates a random context (a situation in which then two characters are put) by making use of 3 databases (nouns, adjectives and actions).
1. First, it selects a random noun and adjective, and it generates a setting with that, like "big forest" or "sandy gym".
2. Then, it selects and action, like "talking", "drawing"...
3. Finally, it generates the context using the setting and action, giving a result like "In a sandy gym, where char1 and char2 are drawing."
After all of this is ready, the program prints the result like this:
Random noun selected: beach
Random adjective selected: cultural
Random setting created: cultural beach
Random action selected: sleeping
Random context created: In a cultural beach, where char1 and char2 are sleeping.
Target audience:
This project doesn't have a target audience in mind because it's an experiment. I'm just seeing what I can or can't do. You can consider it a toy, because it's more for entertainment than anything eslse.
But that's just for now. I will, probably, expand this so it gives the users more options, has more variety, etc.
For now, it's made to test while I learn, but maybe in the future it could turn to an app
/r/Python
https://redd.it/1g1e7as
What my project does:
RaCoGen is a simple program that generates a random context (a situation in which then two characters are put) by making use of 3 databases (nouns, adjectives and actions).
1. First, it selects a random noun and adjective, and it generates a setting with that, like "big forest" or "sandy gym".
2. Then, it selects and action, like "talking", "drawing"...
3. Finally, it generates the context using the setting and action, giving a result like "In a sandy gym, where char1 and char2 are drawing."
After all of this is ready, the program prints the result like this:
Random noun selected: beach
Random adjective selected: cultural
Random setting created: cultural beach
Random action selected: sleeping
Random context created: In a cultural beach, where char1 and char2 are sleeping.
Target audience:
This project doesn't have a target audience in mind because it's an experiment. I'm just seeing what I can or can't do. You can consider it a toy, because it's more for entertainment than anything eslse.
But that's just for now. I will, probably, expand this so it gives the users more options, has more variety, etc.
For now, it's made to test while I learn, but maybe in the future it could turn to an app
/r/Python
https://redd.it/1g1e7as
Reddit
From the Python community on Reddit: Random context generator - RaCoGen (provisional name)
Explore this post and more from the Python community
Automatic Flowcharts
Are there any tools or libraries that make automatic flowcharts or something similar? Like the call stack when debugging but more like a diagram of all the calls that are made since an if name == '__main__' is executed. It would be useful to see more or less what a program does even if it is not completely accurate.
/r/Python
https://redd.it/1g190dl
Are there any tools or libraries that make automatic flowcharts or something similar? Like the call stack when debugging but more like a diagram of all the calls that are made since an if name == '__main__' is executed. It would be useful to see more or less what a program does even if it is not completely accurate.
/r/Python
https://redd.it/1g190dl
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Web Developer Job Opportunity
Hi, we have listed a new job on our platform so if you are looking for a Web Developer job please check the below link
Role - Web Developer / Remote / East Coast 🧑💻 (Remote, Full-Time) 🚀
Job Link - https://devloprr.com/jobs#314
https://preview.redd.it/jafvhphdyvtd1.png?width=989&format=png&auto=webp&s=f72d1448ce1077926d9e037b96552ee7a3695298
/r/flask
https://redd.it/1g0dxpg
Hi, we have listed a new job on our platform so if you are looking for a Web Developer job please check the below link
Role - Web Developer / Remote / East Coast 🧑💻 (Remote, Full-Time) 🚀
Job Link - https://devloprr.com/jobs#314
https://preview.redd.it/jafvhphdyvtd1.png?width=989&format=png&auto=webp&s=f72d1448ce1077926d9e037b96552ee7a3695298
/r/flask
https://redd.it/1g0dxpg
Devloprr
Login - devloprr.com
devloprr.com is a new social media and collaboration platform created for Developers/programmers where developers can create account, blogs and post short content and long articles and earn money from Monetization as well.
Do I need Nginx if I have a Network Load Balancer in front of Gunicorn / Flask?
I am new to Gunicorn and have seen that it is highly recommended to have it behind some sort of reverse proxy, namely Nginx.
The backend of the application is just a REST API and does not serve any static files. It is running in a private subnet, so the NLB is being used to forward traffic to it. I am not sure how I would do this with Nginx...or even if it is necessary in this case as I already have a load balancer.
Any input or thoughts on this would be appreciated.
/r/flask
https://redd.it/1g1m7pg
I am new to Gunicorn and have seen that it is highly recommended to have it behind some sort of reverse proxy, namely Nginx.
The backend of the application is just a REST API and does not serve any static files. It is running in a private subnet, so the NLB is being used to forward traffic to it. I am not sure how I would do this with Nginx...or even if it is necessary in this case as I already have a load balancer.
Any input or thoughts on this would be appreciated.
/r/flask
https://redd.it/1g1m7pg
Reddit
From the flask community on Reddit
Explore this post and more from the flask community