FLASK/SQLite NIGHTMARE - Please help!
(UPDATE: THANK YOU! AFTER HOURS I FIGURED IT OUT)
Hey guys,
So I'm new to the whole web app thing, but I've been following this tutorial on how the basics work: https://www.youtube.com/watch?v=dam0GPOAvVI
Here's the github for the code he's also used:
https://github.com/techwithtim/Flask-Web-App-Tutorial/tree/main
Basically, I feel like I've done GREAT so far, following along well. This is what I have managed to produce so far with working pages, routes, re-directs etc:
https://preview.redd.it/gcb1cy9itn2e1.png?width=1920&format=png&auto=webp&s=31083b872512910c5d445d0d6b19a0f3254ad931
BUT... I've hit a complete and utter stop when it comes to putting this \^ data into the SQ Database.
This is the code I have for this area and all my other files copy the same names, as well as my html files:
u/auth.route('/register', methods='GET', 'POST')
def register():
if request.method == 'POST':
email = request.form.get('email')
username = request.form.get('username')
password1 = request.form.get('password1')
password2 = request.form.get('password2')
/r/flask
https://redd.it/1gy0rv5
(UPDATE: THANK YOU! AFTER HOURS I FIGURED IT OUT)
Hey guys,
So I'm new to the whole web app thing, but I've been following this tutorial on how the basics work: https://www.youtube.com/watch?v=dam0GPOAvVI
Here's the github for the code he's also used:
https://github.com/techwithtim/Flask-Web-App-Tutorial/tree/main
Basically, I feel like I've done GREAT so far, following along well. This is what I have managed to produce so far with working pages, routes, re-directs etc:
https://preview.redd.it/gcb1cy9itn2e1.png?width=1920&format=png&auto=webp&s=31083b872512910c5d445d0d6b19a0f3254ad931
BUT... I've hit a complete and utter stop when it comes to putting this \^ data into the SQ Database.
This is the code I have for this area and all my other files copy the same names, as well as my html files:
u/auth.route('/register', methods='GET', 'POST')
def register():
if request.method == 'POST':
email = request.form.get('email')
username = request.form.get('username')
password1 = request.form.get('password1')
password2 = request.form.get('password2')
/r/flask
https://redd.it/1gy0rv5
YouTube
Python Website Full Tutorial - Flask, Authentication, Databases & More
GET MY FREE SOFTWARE DEVELOPMENT GUIDE👇
https://training.techwithtim.net/free-guide
In this video, I'm going to be showing you how to make a website with Python, covering Flask, authentication, databases, and more. The goal of this video is to give you what…
https://training.techwithtim.net/free-guide
In this video, I'm going to be showing you how to make a website with Python, covering Flask, authentication, databases, and more. The goal of this video is to give you what…
ASP.NET and Django. What's the difference?
I'd like to say that I'm not looking for an answer about which one is better, but that's a lie. However, this is subjective for everyone.
If there are anyone here who has experience with both ASP.NET and Django, please share your impressions.
P.S. I searched, but if anyone made a comparison, it was years ago!
/r/djangolearning
https://redd.it/1gv90p8
I'd like to say that I'm not looking for an answer about which one is better, but that's a lie. However, this is subjective for everyone.
If there are anyone here who has experience with both ASP.NET and Django, please share your impressions.
P.S. I searched, but if anyone made a comparison, it was years ago!
/r/djangolearning
https://redd.it/1gv90p8
Microsoft
ASP.NET Core, an open-source web development framework | .NET
Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.
Benchmark: DuckDB, Polars, Pandas, Arrow, SQLite, NanoCube on filtering / point queryies
While working on the NanoCube project, an in-process OLAP-style query engine written in Python, I needed a baseline performance comparison against the most prominent in-process data engines: DuckDB, Polars, Pandas, Arrow and SQLite. I already had a comparison with Pandas, but now I have it for all of them. My findings:
A purpose-built technology (here OLAP-style queries with NanoCube) written in Python can be faster than general purpose high-end solutions written in C.
A fully index SQL database is still a thing, although likely a bit outdated for modern data processing and analysis.
DuckDB and Polars are awesome technologies and best for large scale data processing.
Sorting of data matters! Do it! Always! If you can afford the time/cost to sort your data before storing it. Especially DuckDB and Nanocube deliver significantly faster query times.
The **full comparison** with many very nice charts can be found in the **NanoCube GitHub repo**. Maybe it's of interest to some of you. Enjoy...
|\#|technology|duration_sec|factor|
|:-|:-|:-|:-|
|0|NanoCube|0.016|1|
|1|SQLite (indexed)|0.133|8.312|
|2|Polars|0.534|33.375|
|3|Arrow|1.933|120.812|
|4|DuckDB|4.171|260.688|
|5|SQLite|12.452|778.25|
|6|Pandas|36.457|2278.56|
The table above shows the duration for 1000x point queries on the
/r/Python
https://redd.it/1gyoi7n
While working on the NanoCube project, an in-process OLAP-style query engine written in Python, I needed a baseline performance comparison against the most prominent in-process data engines: DuckDB, Polars, Pandas, Arrow and SQLite. I already had a comparison with Pandas, but now I have it for all of them. My findings:
A purpose-built technology (here OLAP-style queries with NanoCube) written in Python can be faster than general purpose high-end solutions written in C.
A fully index SQL database is still a thing, although likely a bit outdated for modern data processing and analysis.
DuckDB and Polars are awesome technologies and best for large scale data processing.
Sorting of data matters! Do it! Always! If you can afford the time/cost to sort your data before storing it. Especially DuckDB and Nanocube deliver significantly faster query times.
The **full comparison** with many very nice charts can be found in the **NanoCube GitHub repo**. Maybe it's of interest to some of you. Enjoy...
|\#|technology|duration_sec|factor|
|:-|:-|:-|:-|
|0|NanoCube|0.016|1|
|1|SQLite (indexed)|0.133|8.312|
|2|Polars|0.534|33.375|
|3|Arrow|1.933|120.812|
|4|DuckDB|4.171|260.688|
|5|SQLite|12.452|778.25|
|6|Pandas|36.457|2278.56|
The table above shows the duration for 1000x point queries on the
car_prices_us dataset (available on kaggle.com) containing 16x columns and 558,837x rows. The query is highly selective, filtering on 4 dimensions (model='Optima', trim='LX', make='Kia', body='Sedan') and aggregating column mmr./r/Python
https://redd.it/1gyoi7n
GitHub
GitHub - nanocubeai/nanocube: Lightning fast OLAP-style point queries on Pandas DataFrames.
Lightning fast OLAP-style point queries on Pandas DataFrames. - nanocubeai/nanocube
any performance issues for django-parler?
I am looking for i18n packages, django-parler seems good, but are there any cons?? it requires inner join, is it going to affect the performance?? is it negligible if I use select_related or prefect_relateed
/r/django
https://redd.it/1gywmyg
I am looking for i18n packages, django-parler seems good, but are there any cons?? it requires inner join, is it going to affect the performance?? is it negligible if I use select_related or prefect_relateed
/r/django
https://redd.it/1gywmyg
Reddit
From the django community on Reddit
Explore this post and more from the django community
[OC] (Dooit V3) A very customizable TUI Todo Manager!
**What My Project Does:**
Dooit is a TUI based todo manager app which gives you a nice user interface to organize your tasks. Unlike other applications, dooit runs directly in your terminal!
It tries to be function and customizable at the same time
**Key Features:**
* An interactive & beautiful UI
* Fully customizable, you can configure your bar, your colors and how everything is displayed!
* Extensible, python config file allows you to do as much as you like!
* Vim like keybindings
* Topicwise separated Todo Lists (With branching)
**Target Audience:**
Anyone who uses the terminal!
**Comparison with Existing Alternatives:**
There are definitely a lot of options out there but I didnt find anyone which fulfilled all my requirements
**How to Get Started:**
Github Link: [Dooit](https://github.com/dooit-org/dooit)
Get started with the [Dooit Docs](https://dooit-org.github.io/dooit/)
/r/Python
https://redd.it/1gysoo4
**What My Project Does:**
Dooit is a TUI based todo manager app which gives you a nice user interface to organize your tasks. Unlike other applications, dooit runs directly in your terminal!
It tries to be function and customizable at the same time
**Key Features:**
* An interactive & beautiful UI
* Fully customizable, you can configure your bar, your colors and how everything is displayed!
* Extensible, python config file allows you to do as much as you like!
* Vim like keybindings
* Topicwise separated Todo Lists (With branching)
**Target Audience:**
Anyone who uses the terminal!
**Comparison with Existing Alternatives:**
There are definitely a lot of options out there but I didnt find anyone which fulfilled all my requirements
**How to Get Started:**
Github Link: [Dooit](https://github.com/dooit-org/dooit)
Get started with the [Dooit Docs](https://dooit-org.github.io/dooit/)
/r/Python
https://redd.it/1gysoo4
GitHub
GitHub - dooit-org/dooit: An awesome TUI todo manager
An awesome TUI todo manager. Contribute to dooit-org/dooit development by creating an account on GitHub.
DRF + React
Hello, everyone. I'm planning to build an ecomm over the next few weeks and would appreciate some guidance from more experienced developers. Could you share the best approach to take for building a scalable, efficient ecomm? Additionally, what libraries or tools do you recommend that could help streamline the development process and make things easier along the way?
/r/django
https://redd.it/1gyxp4q
Hello, everyone. I'm planning to build an ecomm over the next few weeks and would appreciate some guidance from more experienced developers. Could you share the best approach to take for building a scalable, efficient ecomm? Additionally, what libraries or tools do you recommend that could help streamline the development process and make things easier along the way?
/r/django
https://redd.it/1gyxp4q
Reddit
From the django community on Reddit
Explore this post and more from the django community
Can't link CSS files to HTML in Flask Blueprints!
I’m a total beginner at (any) development and this is my first flask application. I’m having trouble linking CSS files to HTML when inside a blueprint. It works fine outside a blueprint.
Here's my project file structure -
project_root/
|
├── app.py
├── templates/
│ └── (global templates)
├── static/
│ └── (global static files)
├── auth/ # my blueprint
│ ├── __init__.py
│ ├── routes.py
│ ├── templates/
│ │ └── main.html
│ └── static/
│ └──main.css
I'm trying to link the auth/static/main.css file in the auth/templates/main.html file like this -
`<link rel = 'stylesheet' type="text/css" href="{{url_for('auth.static', filename='main.css')}}">`
I’ve tried changing the `url_for` with “static” or specifying the filename to auth.static.main.ss or static/main.css, but none work. It correctly displays the main.html but without any styling.
I suspect the `url_for` function inside the blueprint is incorrect.
/r/flask
https://redd.it/1gz0sps
I’m a total beginner at (any) development and this is my first flask application. I’m having trouble linking CSS files to HTML when inside a blueprint. It works fine outside a blueprint.
Here's my project file structure -
project_root/
|
├── app.py
├── templates/
│ └── (global templates)
├── static/
│ └── (global static files)
├── auth/ # my blueprint
│ ├── __init__.py
│ ├── routes.py
│ ├── templates/
│ │ └── main.html
│ └── static/
│ └──main.css
I'm trying to link the auth/static/main.css file in the auth/templates/main.html file like this -
`<link rel = 'stylesheet' type="text/css" href="{{url_for('auth.static', filename='main.css')}}">`
I’ve tried changing the `url_for` with “static” or specifying the filename to auth.static.main.ss or static/main.css, but none work. It correctly displays the main.html but without any styling.
I suspect the `url_for` function inside the blueprint is incorrect.
/r/flask
https://redd.it/1gz0sps
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Django forms?
Hey there 👋
I am struggling to understand Django forms can anyone help share some resources
/r/djangolearning
https://redd.it/1gyn0hh
Hey there 👋
I am struggling to understand Django forms can anyone help share some resources
/r/djangolearning
https://redd.it/1gyn0hh
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Incoming data not being comitted to the database
I am trying to make a registration page, for my website. The data is coming from the javanoscript frontend to the backend successfully (evident by browser logs.) and by print statements, but the incoming data is failing to commit to the database.
Background, App is made with "Role Based Access" in mind with models User, Roles and UserRoles (association table)
Here creation of instance of User first is necessary so that its (
@app.route('/register', methods='POST')
def register():
data = request.getjson()
username = data.get('username')
email = data.get('email')
password = data.get('password')
role = data.get('role')
socialm =data.get('socialmedia')
handle = data.get('handle')
country = data.get('country')
/r/flask
https://redd.it/1gysp9f
I am trying to make a registration page, for my website. The data is coming from the javanoscript frontend to the backend successfully (evident by browser logs.) and by print statements, but the incoming data is failing to commit to the database.
Background, App is made with "Role Based Access" in mind with models User, Roles and UserRoles (association table)
Influencer and Sponsor inherit from User and their primary keys and foreign keys are same. i.e (influencer_id and sponsor_id) respectively.Here creation of instance of User first is necessary so that its (
user_id) could be used to populate the primary keys of Influencer and Sponsor.@app.route('/register', methods='POST')
def register():
data = request.getjson()
username = data.get('username')
email = data.get('email')
password = data.get('password')
role = data.get('role')
socialm =data.get('socialmedia')
handle = data.get('handle')
country = data.get('country')
/r/flask
https://redd.it/1gysp9f
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 denoscription 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
**Denoscription**: 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
**Denoscription**: 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
**Denoscription**: Create a noscript 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/1gz5fou
# 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 denoscription 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
**Denoscription**: 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
**Denoscription**: 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
**Denoscription**: Create a noscript 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/1gz5fou
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…
I made a Spotify → YouTube Music converter that doesn't need API keys! [GUI]
Hey r/python! After Spotify decided to make their mobile app practically unusable for free users, my friend u/zakede and I decided to switch to YT Music. With our huge libraries, we needed something to convert our playlists, so we made this. It works with a Web GUI (made in FastHTML), and did I mention you don't need any API or OAuth keys?
**What it does:**
* Transfers your Spotify playlists/albums/liked songs to YouTube Music
* Has a simple Web GUI
* Better song search than the default YouTube one (at least in my testing)
* No API keys needed
**Target Audience:** This is for anyone who:
* Is switching from Spotify to YouTube Music
* Wants to maintain libraries on both platforms (Library sync is on the roadmap)
* Is tired of copying playlists manually
* Doesn't want to mess with API keys
**How it's different:** Most existing tools either:
* Require you to get API keys and do OAuth (which is currently [broken](https://github.com/sigma67/ytmusicapi/issues/676) for YT Music)
* Are online services that are slow and have low limits (the one I tried only allowed 150 songs per playlist and a total of 5 playlists)
* Are CLI-only
Here's the source: [spotify-to-ytm](https://github.com/Kan1shak/spotify-to-ytm)
Would love to hear your thoughts! Let me know if you try it out
/r/Python
https://redd.it/1gz2vhf
Hey r/python! After Spotify decided to make their mobile app practically unusable for free users, my friend u/zakede and I decided to switch to YT Music. With our huge libraries, we needed something to convert our playlists, so we made this. It works with a Web GUI (made in FastHTML), and did I mention you don't need any API or OAuth keys?
**What it does:**
* Transfers your Spotify playlists/albums/liked songs to YouTube Music
* Has a simple Web GUI
* Better song search than the default YouTube one (at least in my testing)
* No API keys needed
**Target Audience:** This is for anyone who:
* Is switching from Spotify to YouTube Music
* Wants to maintain libraries on both platforms (Library sync is on the roadmap)
* Is tired of copying playlists manually
* Doesn't want to mess with API keys
**How it's different:** Most existing tools either:
* Require you to get API keys and do OAuth (which is currently [broken](https://github.com/sigma67/ytmusicapi/issues/676) for YT Music)
* Are online services that are slow and have low limits (the one I tried only allowed 150 songs per playlist and a total of 5 playlists)
* Are CLI-only
Here's the source: [spotify-to-ytm](https://github.com/Kan1shak/spotify-to-ytm)
Would love to hear your thoughts! Let me know if you try it out
/r/Python
https://redd.it/1gz2vhf
GitHub
400 Bad Request error when using oauth, but browser authentication works · Issue #676 · sigma67/ytmusicapi
Describe the bug the ytmusic.search() command is throwing a HTTP 400: Bad Request error with the message Request contains an invalid argument, but only when using oauth. Browser authentication work...
Django + MTN momo integration.
Hi everyone,
I’m working on a Django project, and I want to integrate MTN MoMo (Mobile Money) for payment processing. I’ve gone through the MTN MoMo API documentation, but I’m still a bit confused about how to set it up with Django.
I’m also wondering if there are any reliable third-party APIs or libraries available that make the integration process simpler or more efficient
If anyone here has experience with this, could you share
Thanks.
/r/django
https://redd.it/1gz4d68
Hi everyone,
I’m working on a Django project, and I want to integrate MTN MoMo (Mobile Money) for payment processing. I’ve gone through the MTN MoMo API documentation, but I’m still a bit confused about how to set it up with Django.
I’m also wondering if there are any reliable third-party APIs or libraries available that make the integration process simpler or more efficient
If anyone here has experience with this, could you share
Thanks.
/r/django
https://redd.it/1gz4d68
Reddit
From the django community on Reddit
Explore this post and more from the django community
How to get user input for a Flask App with Autogen AI Agents?
Hi,
I am trying to implement Autogen agents with a Flask App. The new version of autogen-agentchat library allows a rich architecture for multiagent systems.
The following is an example from the documentation (Swarm Chat) that starts an agent chat, where at some point a user input is needed. The chat stops at that point. Then whenever the user input is obtained the chat is resumed.
I want to implement this in a Flask App. So there will be an endpoint that receives user messages. Then:
If
/r/flask
https://redd.it/1gyrccn
Hi,
I am trying to implement Autogen agents with a Flask App. The new version of autogen-agentchat library allows a rich architecture for multiagent systems.
The following is an example from the documentation (Swarm Chat) that starts an agent chat, where at some point a user input is needed. The chat stops at that point. Then whenever the user input is obtained the chat is resumed.
import asyncio from autogen_ext.models import OpenAIChatCompletionClient from autogen_agentchat.agents import AssistantAgent from autogen_agentchat.teams import Swarm from autogen_agentchat.task import HandoffTermination, Console, MaxMessageTermination from autogen_agentchat.messages import HandoffMessage async def main() -> None: model_client = OpenAIChatCompletionClient(model="gpt-4o" api_key=os.environ.get("OPENAI_API_KEY)) agent = AssistantAgent( "Alice", model_client=model_client, handoffs=["user"], system_message="You are Alice and you only answer questions about yourself, ask the user for help if needed.", ) termination = HandoffTermination(target="user") | MaxMessageTermination(3) team = Swarm([agent], termination_condition=termination) # Start the conversation. await Console(team.run_stream(task="What is bob's birthday?")) # Resume with user feedback. await Console( team.run_stream( task=HandoffMessage(source="user", target="Alice", content="Bob's birthday is on 1st January.") ) ) asyncio.run(main())I want to implement this in a Flask App. So there will be an endpoint that receives user messages. Then:
If
/r/flask
https://redd.it/1gyrccn
D Self-Promotion Thread
Please post your personal projects, startups, product placements, collaboration needs, blogs etc.
Please mention the payment and pricing requirements for products and services.
Please do not post link shorteners, link aggregator websites , or auto-subscribe links.
--
Any abuse of trust will lead to bans.
Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the noscript.
--
Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.
/r/MachineLearning
https://redd.it/1gyhfxm
Please post your personal projects, startups, product placements, collaboration needs, blogs etc.
Please mention the payment and pricing requirements for products and services.
Please do not post link shorteners, link aggregator websites , or auto-subscribe links.
--
Any abuse of trust will lead to bans.
Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the noscript.
--
Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.
/r/MachineLearning
https://redd.it/1gyhfxm
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
BadRequestKey error. Getting an error saying the keyerror is confirmpassword. Is there a problem in my code?
@app.route('/register', methods=['GET' , 'POST'])
def register():
from authoperations import registeruser
if request.method == 'POST':
username = request.form['username']
password = request.form['password']
confirmpassword = request.form'confirm_password'
/r/flask
https://redd.it/1gy6mbh
@app.route('/register', methods=['GET' , 'POST'])
def register():
from authoperations import registeruser
if request.method == 'POST':
username = request.form['username']
password = request.form['password']
confirmpassword = request.form'confirm_password'
/r/flask
https://redd.it/1gy6mbh
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
What do you think is the most visually appealing or 'good-looking' Python GUI library, and why?
I’m looking for a GUI library that provides a sleek and modern interface with attractive, polished design elements. Ideally, it should support custom styling and look aesthetically pleasing out-of-the-box. Which libraries would you recommend for creating visually appealing desktop applications in Python?
/r/Python
https://redd.it/1gzmv9p
I’m looking for a GUI library that provides a sleek and modern interface with attractive, polished design elements. Ideally, it should support custom styling and look aesthetically pleasing out-of-the-box. Which libraries would you recommend for creating visually appealing desktop applications in Python?
/r/Python
https://redd.it/1gzmv9p
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
What do you think of front-end python libraries such as Reflex (old Pynecone)?
As a doctor, Python has been really useful for me in a bunch of ways. Lately, I`ve been trying to learn web development, saw some Flask/Jinja/HTML/CSS tutorials, but doing anything without javanoscript seems very clunky and unnatural.
Then, I saw this library called REFLEX (old Pynecone). Seems very beautiful and powerful..
The thing is. Is it worth for me to use my limited time to learn a framework like this or should I just go ahead and learn Javanoscript/React already?
What do you guys think? I won`t be a professional developer.
/r/Python
https://redd.it/1gznoub
As a doctor, Python has been really useful for me in a bunch of ways. Lately, I`ve been trying to learn web development, saw some Flask/Jinja/HTML/CSS tutorials, but doing anything without javanoscript seems very clunky and unnatural.
Then, I saw this library called REFLEX (old Pynecone). Seems very beautiful and powerful..
The thing is. Is it worth for me to use my limited time to learn a framework like this or should I just go ahead and learn Javanoscript/React already?
What do you guys think? I won`t be a professional developer.
/r/Python
https://redd.it/1gznoub
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Security by fragility
So one of our websites got attacked today. Not a critical website,
Certain pages that require a secret 8-character alphanumeric code were being called thousands of times a minute.
This could have been a problem.
But thanks to my trusty SQLite3 database and literally zero optimisations anywhere, my server dutifully went down in minutes.
And so the hacker was not able to retrieve any valuable information.
And now we implemented some basic defenses.
Can't get hacked if your site's crashed !
/r/django
https://redd.it/1gzsjtv
So one of our websites got attacked today. Not a critical website,
Certain pages that require a secret 8-character alphanumeric code were being called thousands of times a minute.
This could have been a problem.
But thanks to my trusty SQLite3 database and literally zero optimisations anywhere, my server dutifully went down in minutes.
And so the hacker was not able to retrieve any valuable information.
And now we implemented some basic defenses.
Can't get hacked if your site's crashed !
/r/django
https://redd.it/1gzsjtv
Reddit
From the django community on Reddit
Explore this post and more from the django community
nxt-python and pyusb on OpenSuse Linux
I have a mindstorm NXT lying around in the house that my kinds used for school several years ago. I tought of interfacing it with python. I downloaded the nxt-python. It uses pyusb. When I tested it out with the tutorial from [https://ni.srht.site/nxt-python/latest/handbook/tutorial.html](https://ni.srht.site/nxt-python/latest/handbook/tutorial.html) and tried to locate the device using the following code:
#!/usr/bin/python3
"""NXT-Python tutorial: use touch sensor."""
import time
import nxt.locator
import nxt.sensor
import nxt.sensor.generic
with nxt.locator.find() as b:
# Get the sensor connected to port 1, not a digital sensor, must give the sensor
# class.
mysensor = b.get_sensor(nxt.sensor.Port.S1, nxt.sensor.generic.Touch)
# Read the sensor in a loop (until interrupted).
print("Use Ctrl-C to interrupt")
while True:
/r/Python
https://redd.it/1gztwtn
I have a mindstorm NXT lying around in the house that my kinds used for school several years ago. I tought of interfacing it with python. I downloaded the nxt-python. It uses pyusb. When I tested it out with the tutorial from [https://ni.srht.site/nxt-python/latest/handbook/tutorial.html](https://ni.srht.site/nxt-python/latest/handbook/tutorial.html) and tried to locate the device using the following code:
#!/usr/bin/python3
"""NXT-Python tutorial: use touch sensor."""
import time
import nxt.locator
import nxt.sensor
import nxt.sensor.generic
with nxt.locator.find() as b:
# Get the sensor connected to port 1, not a digital sensor, must give the sensor
# class.
mysensor = b.get_sensor(nxt.sensor.Port.S1, nxt.sensor.generic.Touch)
# Read the sensor in a loop (until interrupted).
print("Use Ctrl-C to interrupt")
while True:
/r/Python
https://redd.it/1gztwtn
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Deploying Flask-based Microservices on AWS with ECS Service Connect
The playlist is broken into six parts:
1. An introduction to ECS Service Connect and the various AWS components that will be used
2. Run the flask-based microservice architecture locally before diving into AWS
3. Get the flask-based microservice architecture **just working** on AWS. We'll rely on a lot of the defaults provided by AWS on the networking to get a working example quickly that you can see in action on AWS
4. We'll do the same as the previous video, but not rely on default networking setup by AWS. We'll configure networking ourselves with the recommended AWS approach so the app is production-ready
5. Use GitHub Actions to automate deployments to our flask app code running on our microservice architecture on AWS
6. Run a CDK (Cloud Development Kit) noscript that will create both the AWS networking components, as well as the ECS components. After running the noscript with a single `cdk deploy --all` command, the microservice architecture will be fully functional
This tutorial truly is end-to-end. If you enjoy the content, you can help me a ton by doing any or all of the following:
[supporting me on Patreon](https://www.patreon.com/programmingwithalex)
subscribing to my YouTube channel
liking and/or commenting on the videos
sharing the video(s) or channel on any
/r/flask
https://redd.it/1gzmk8u
The playlist is broken into six parts:
1. An introduction to ECS Service Connect and the various AWS components that will be used
2. Run the flask-based microservice architecture locally before diving into AWS
3. Get the flask-based microservice architecture **just working** on AWS. We'll rely on a lot of the defaults provided by AWS on the networking to get a working example quickly that you can see in action on AWS
4. We'll do the same as the previous video, but not rely on default networking setup by AWS. We'll configure networking ourselves with the recommended AWS approach so the app is production-ready
5. Use GitHub Actions to automate deployments to our flask app code running on our microservice architecture on AWS
6. Run a CDK (Cloud Development Kit) noscript that will create both the AWS networking components, as well as the ECS components. After running the noscript with a single `cdk deploy --all` command, the microservice architecture will be fully functional
This tutorial truly is end-to-end. If you enjoy the content, you can help me a ton by doing any or all of the following:
[supporting me on Patreon](https://www.patreon.com/programmingwithalex)
subscribing to my YouTube channel
liking and/or commenting on the videos
sharing the video(s) or channel on any
/r/flask
https://redd.it/1gzmk8u
YouTube
Microservices on AWS with ECS Service Connect - Part 1: Introduction
Please consider supporting me on Patreon: https://www.patreon.com/programmingwithalex
GitHub link: https://github.com/programmingwithalex/aws_ecs_service_connect
00:00 - Intro
01:13 - What are microservices?
02:21 - What is Service Connect?
02:46 - Series…
GitHub link: https://github.com/programmingwithalex/aws_ecs_service_connect
00:00 - Intro
01:13 - What are microservices?
02:21 - What is Service Connect?
02:46 - Series…