Help with Auth Tokens from other APIs
Quick overview of what I'm trying to build: User clicks a link, does an Oauth for API 1 is redirected to an Oauth for API 2 and then that is the last interaction the user has. Afterwards a subscription service from API 1 sends information that a record in API 1 has updated. This triggers calling information from API 1 using it go get information from API 2 and then updating the record on API 1 with information gathered from API 2. I'm fairly new to development, but I have all of this working locally using Flask and session[\] variables to store the tokens and use them when re-authenticating and refreshing.
Now that I am getting ready to actually implement this in the real world and not just my local machine I'm not sure what I need to do in order to store these tokens since there will be no user after they authorize my application with both of the other API's and so I obviously can't get them to click authorize since they won't be actively going to a page when I need to call the APIs. Searching has lead to way too many different
/r/flask
https://redd.it/186sd5f
Quick overview of what I'm trying to build: User clicks a link, does an Oauth for API 1 is redirected to an Oauth for API 2 and then that is the last interaction the user has. Afterwards a subscription service from API 1 sends information that a record in API 1 has updated. This triggers calling information from API 1 using it go get information from API 2 and then updating the record on API 1 with information gathered from API 2. I'm fairly new to development, but I have all of this working locally using Flask and session[\] variables to store the tokens and use them when re-authenticating and refreshing.
Now that I am getting ready to actually implement this in the real world and not just my local machine I'm not sure what I need to do in order to store these tokens since there will be no user after they authorize my application with both of the other API's and so I obviously can't get them to click authorize since they won't be actively going to a page when I need to call the APIs. Searching has lead to way too many different
/r/flask
https://redd.it/186sd5f
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Sunday Daily Thread: What's everyone working on this week?
# Weekly Thread: What's Everyone Working On This Week? 🛠️
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟
/r/Python
https://redd.it/189go42
# Weekly Thread: What's Everyone Working On This Week? 🛠️
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟
/r/Python
https://redd.it/189go42
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
My first large scraping website built using Django
14 months I decided to learn programming. After 10 years as a nurse I needed a change. 3 months ago I built my wife a ecommerce website using Django and learned a ton. Today I launched my first large scraping website using Selenium and BS4. I used redis, celery, and postgres for this project. I use the Appliku SaaS to aide in easy deployment, a Hetzner server, and S3 bucket and CDN for images. I know very little JavaScript so I bought the HTML template off themeforest for like $12. I then manipulated the HTML and inserted the Django portions. I also use HTMX to decrease page reloads. HTMX is used mostly when submitting forms. I had to learn Docker due to needing a customized Dockerfile for selenium. At first I was using Playwright, but could not figure out how to get Playwright to work with the Dockerfile, so I switched to Selenium. One thing I noticed on my ecomm website was the large amount of bots that would sign up to site and send messages through contact form so I added ReCaptcha to help prevent this. I would suggest adding ReCaptcha as it's fairly easy to implement. I built
/r/django
https://redd.it/189e1xh
14 months I decided to learn programming. After 10 years as a nurse I needed a change. 3 months ago I built my wife a ecommerce website using Django and learned a ton. Today I launched my first large scraping website using Selenium and BS4. I used redis, celery, and postgres for this project. I use the Appliku SaaS to aide in easy deployment, a Hetzner server, and S3 bucket and CDN for images. I know very little JavaScript so I bought the HTML template off themeforest for like $12. I then manipulated the HTML and inserted the Django portions. I also use HTMX to decrease page reloads. HTMX is used mostly when submitting forms. I had to learn Docker due to needing a customized Dockerfile for selenium. At first I was using Playwright, but could not figure out how to get Playwright to work with the Dockerfile, so I switched to Selenium. One thing I noticed on my ecomm website was the large amount of bots that would sign up to site and send messages through contact form so I added ReCaptcha to help prevent this. I would suggest adding ReCaptcha as it's fairly easy to implement. I built
/r/django
https://redd.it/189e1xh
Reddit
From the django community on Reddit: My first large scraping website built using Django
Explore this post and more from the django community
Just found a library for Rust-style errors in Python
Was dreading having to do try/except for a bunch of stuff and found this Rust-style errors lib: https://github.com/rustedpy/result/
Anyone else converted?
/r/Python
https://redd.it/1897m0y
Was dreading having to do try/except for a bunch of stuff and found this Rust-style errors lib: https://github.com/rustedpy/result/
Anyone else converted?
/r/Python
https://redd.it/1897m0y
GitHub
GitHub - rustedpy/result: NOT MAINTAINED - A simple Rust like Result type for Python 3. Fully type annotated.
NOT MAINTAINED - A simple Rust like Result type for Python 3. Fully type annotated. - rustedpy/result
Sending mail via flask
I am trying to send mail using flask but i keep getting this error
(550, b'User hello@mymail.com has exceeded its 24-hour sending limit. Messages to 5 recipients out of 5 allowed have been sent. Relay quota will reset in 6.47 hours.', 'hello@mymail.com')
Here is my code
app.config"MAIL_SERVER" = "smtp.office365.com"
app.config"MAIL_PORT" = 587
app.config"START_TLS" = False
def sendemailverification(name, email, subid):
"""sending email verification""" expires = datetime.timedelta(minutes=30000) token = createaccesstoken(identity=str(subid), expiresdelta=expires)
msg = Message(
subject=PROJECTNAME, sender=app.config"MAIL_USERNAME", recipients=email
)
msg.html = rendertemplate(
"email-verification.html",
link=REACTROUTE + "/subscriber-changes?token=" + token + "&email=" + email,
email=email,
name=name,
websitename=PROJECTNAME,
reactroute=REACTROUTE,
)
mail.send(msg)
message = MIMEMultipart() message'From' = app.config"MAIL_USERNAME" message'To' = email message'Subject' = "View Changes" message.attach(MIMEText("body of mail", 'plain'))
Connect to the SMTP server
with smtplib.SMTP('smtpout.secureserver.net', 587) as server: server.starttls()
Log in to the server
server.login(app.config"MAIL_USERNAME", app.config"MAIL_PASSWORD")
/r/flask
https://redd.it/186ky1h
I am trying to send mail using flask but i keep getting this error
(550, b'User hello@mymail.com has exceeded its 24-hour sending limit. Messages to 5 recipients out of 5 allowed have been sent. Relay quota will reset in 6.47 hours.', 'hello@mymail.com')
Here is my code
app.config"MAIL_SERVER" = "smtp.office365.com"
app.config"MAIL_PORT" = 587
app.config"START_TLS" = False
def sendemailverification(name, email, subid):
"""sending email verification""" expires = datetime.timedelta(minutes=30000) token = createaccesstoken(identity=str(subid), expiresdelta=expires)
msg = Message(
subject=PROJECTNAME, sender=app.config"MAIL_USERNAME", recipients=email
)
msg.html = rendertemplate(
"email-verification.html",
link=REACTROUTE + "/subscriber-changes?token=" + token + "&email=" + email,
email=email,
name=name,
websitename=PROJECTNAME,
reactroute=REACTROUTE,
)
mail.send(msg)
message = MIMEMultipart() message'From' = app.config"MAIL_USERNAME" message'To' = email message'Subject' = "View Changes" message.attach(MIMEText("body of mail", 'plain'))
Connect to the SMTP server
with smtplib.SMTP('smtpout.secureserver.net', 587) as server: server.starttls()
Log in to the server
server.login(app.config"MAIL_USERNAME", app.config"MAIL_PASSWORD")
/r/flask
https://redd.it/186ky1h
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Overriding JSON encoder in Flask 3.0, jsonencoder deprecated?
According to the Flask 3.0 release notes:
> jsonencoder and jsondecoder attributes on app and blueprint, and the corresponding json.JSONEncoder and JSONDecoder classes, are removed.
I need to serialize an ObjectID into str within my app, which i used to do via:
class JSONEncoder(json.JSONEncoder):
def default(self, o):
# objectID
if isinstance(o, ObjectId):
return str(o)
# datetime
if isinstance(o, datetime.datetime):
return str(o)
return json.JSONEncoder.default(self, o)
and
app.jsonencoder = JSONEncoder
how are people doing it now?
/r/flask
https://redd.it/1869xe9
According to the Flask 3.0 release notes:
> jsonencoder and jsondecoder attributes on app and blueprint, and the corresponding json.JSONEncoder and JSONDecoder classes, are removed.
I need to serialize an ObjectID into str within my app, which i used to do via:
class JSONEncoder(json.JSONEncoder):
def default(self, o):
# objectID
if isinstance(o, ObjectId):
return str(o)
# datetime
if isinstance(o, datetime.datetime):
return str(o)
return json.JSONEncoder.default(self, o)
and
app.jsonencoder = JSONEncoder
how are people doing it now?
/r/flask
https://redd.it/1869xe9
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Chunks or save()?
I'm a little confused. When saving an uploaded file should I save it using FileSystemStorage( fs.save() ) or should I use chunks? I just want to ensure that I use chunking to save files that are large so that they don't impact performance. But I'm also reading here that files over 2.5MB are streamed to memory by default so does that make chunking obsolete?
/r/django
https://redd.it/189mhur
I'm a little confused. When saving an uploaded file should I save it using FileSystemStorage( fs.save() ) or should I use chunks? I just want to ensure that I use chunking to save files that are large so that they don't impact performance. But I'm also reading here that files over 2.5MB are streamed to memory by default so does that make chunking obsolete?
/r/django
https://redd.it/189mhur
Django Project
Settings | Django documentation
The web framework for perfectionists with deadlines.
[P] Diffusion Models from Scratch | DDPM PyTorch Implementation
https://youtube.com/watch?v=vu6eKteJWew&si=4g3BCsoIMhOWmE-K
/r/MachineLearning
https://redd.it/189lqlh
https://youtube.com/watch?v=vu6eKteJWew&si=4g3BCsoIMhOWmE-K
/r/MachineLearning
https://redd.it/189lqlh
YouTube
Denoising Diffusion Probabilistic Models Code | DDPM Pytorch Implementation
In this video I get into Denoising Diffusion Probabilistic Models implementation ( DDPM ) and walk through the complete Denoising Diffusion Probabilistic Models code in pytorch.
I give a quick overview of math behind diffusion models before getting into…
I give a quick overview of math behind diffusion models before getting into…
Need suggestions to start earning with python
I have been a technology fanatic from a long time. I have a lot of technical skills under my belt. But the sad part is I never knew how to monetize my skills. I have tried using freelancing platforms like fiverr and Upwork. But couldn't find a client. I think I am missing something but I don't know what it is.
I can code confidently and also solve problems. Be it with web technologies or data related. Can you give me suggestions on what I should do?
/r/Python
https://redd.it/189soqz
I have been a technology fanatic from a long time. I have a lot of technical skills under my belt. But the sad part is I never knew how to monetize my skills. I have tried using freelancing platforms like fiverr and Upwork. But couldn't find a client. I think I am missing something but I don't know what it is.
I can code confidently and also solve problems. Be it with web technologies or data related. Can you give me suggestions on what I should do?
/r/Python
https://redd.it/189soqz
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
stripping variable rule in URL after request
hi, I've got a route called
/r/flask
https://redd.it/189rdoz
hi, I've got a route called
/shops/<shopId>/thumbnail, which obviously returns a image/png thumbnail of a certain shop. atop of that there is an after request handler, which adds some caching to the response. is there a way to strip the shopId from the route URL in the after request handler? (so it becomes /shops/<shopId>/thumbnail, instead of e.g. /shops/114/thumbnail)/r/flask
https://redd.it/189rdoz
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Need ideas Licencing/api key management
Basically I have developed an DL model,
I will be hosting it in client environment
I want to keep a track that client uses it on only 10k images(hypothetical number), if client process more than 10k than they have to pay extra charge ..
So I need to build an web api app..
Whenever my model gets executed it will connect to my web app server, will check allowed quota and if allowed will process 100 images(because we cannot keep waiting for request every image inference will go very slow), after 100 images it will again check for allowed quota..
Requirements..
1) keep track of usage
2) manually updatable quota and client management
3) api key management, I should be able to provide api keys to client
Is there any open source library which can help?
Will be hosting on GCP but didn't find any service on gcp
/r/django
https://redd.it/189s1yn
Basically I have developed an DL model,
I will be hosting it in client environment
I want to keep a track that client uses it on only 10k images(hypothetical number), if client process more than 10k than they have to pay extra charge ..
So I need to build an web api app..
Whenever my model gets executed it will connect to my web app server, will check allowed quota and if allowed will process 100 images(because we cannot keep waiting for request every image inference will go very slow), after 100 images it will again check for allowed quota..
Requirements..
1) keep track of usage
2) manually updatable quota and client management
3) api key management, I should be able to provide api keys to client
Is there any open source library which can help?
Will be hosting on GCP but didn't find any service on gcp
/r/django
https://redd.it/189s1yn
Reddit
From the django community on Reddit
Explore this post and more from the django community
Fastest Screen Capturing library for Python checkout windows-capture
I was building an AI for "help" in video games and I found out that most Python screen-capturing libraries are very slow so I made one in Rust here is the repository: https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python
And here is the benchmark
/r/Python
https://redd.it/189xeqy
I was building an AI for "help" in video games and I found out that most Python screen-capturing libraries are very slow so I made one in Rust here is the repository: https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python
And here is the benchmark
/r/Python
https://redd.it/189xeqy
GitHub
windows-capture/windows-capture-python at main · NiiightmareXD/windows-capture
Fastest Windows Screen Capture Library For Rust And Python 🔥 - NiiightmareXD/windows-capture
RMount allows you to create a file-system like connection to a cloud storage i.e. S3 or SSH server
RMount is a lot more robust than existing libraries and methods to create a remote connection to a cloud server. For example you would want to use Python to connect to a cloud storage such as S3 or a remote server via SSH and treat it like a local file-system.
Note
It has been a pain to write this library given how many things can go wrong when treating a cloud storage as a local file-system. For example, connection drops, or writing of large files can make the system unresponsive and lead to loss of data. The library is supposed to take care of such cases but it is always subject to unforeseen failures.
Feel free to try it out
or
Examples
Google Colab
/r/Python
https://redd.it/18a2sn8
RMount is a lot more robust than existing libraries and methods to create a remote connection to a cloud server. For example you would want to use Python to connect to a cloud storage such as S3 or a remote server via SSH and treat it like a local file-system.
Note
It has been a pain to write this library given how many things can go wrong when treating a cloud storage as a local file-system. For example, connection drops, or writing of large files can make the system unresponsive and lead to loss of data. The library is supposed to take care of such cases but it is always subject to unforeseen failures.
Feel free to try it out
or
pip install rmountExamples
Google Colab
/r/Python
https://redd.it/18a2sn8
GitHub
GitHub - fostiropoulos/rmount: A Robust Remote Mount for cloud storage providers or a personal server
A Robust Remote Mount for cloud storage providers or a personal server - GitHub - fostiropoulos/rmount: A Robust Remote Mount for cloud storage providers or a personal server
Flask App Stopped Routing! Help!
So this was working not more than an hour ago and now every time I try to route to anything in my routes.py file I am getting a Not Found (404) error. However, a manual route in my __init__.py file works just fine. I've done everything I can think of to correct and undid any changes in the last hour but nothing seems to be working. Please help, I'm about to scrap all of this and just build again, which I really really don't want to do.
​
Folder Structure
​
run.py
from flask import Flask
from snapflask import app
if name == 'main': app.run(debug=True)
\_init__.py
from flask import Flask
import pyodbc
app=Flask(name)
cnxnstr = ('Driver={SQL Server};' 'Server=AllenAlienware\SQLEXPRESS;' 'Database=snap;' 'Trustedconnection=yes;')
app.config['SECRETKEY']='key' cnxn = pyodbc.connect(cnxnstr, autocommit=True) crsr = cnxn.cursor()
u/app.route('/test') def testroute(): return 'This is a test route'
routes.py
from snapflask import app, crsr, cnxn
from snapflask.User import User
from flask import rendertemplate, redirect, urlfor, flash
from snapflask.forms import RegisterForm, LoginForm
from flasklogin import
/r/flask
https://redd.it/18a0tyd
So this was working not more than an hour ago and now every time I try to route to anything in my routes.py file I am getting a Not Found (404) error. However, a manual route in my __init__.py file works just fine. I've done everything I can think of to correct and undid any changes in the last hour but nothing seems to be working. Please help, I'm about to scrap all of this and just build again, which I really really don't want to do.
​
Folder Structure
​
run.py
from flask import Flask
from snapflask import app
if name == 'main': app.run(debug=True)
\_init__.py
from flask import Flask
import pyodbc
app=Flask(name)
cnxnstr = ('Driver={SQL Server};' 'Server=AllenAlienware\SQLEXPRESS;' 'Database=snap;' 'Trustedconnection=yes;')
app.config['SECRETKEY']='key' cnxn = pyodbc.connect(cnxnstr, autocommit=True) crsr = cnxn.cursor()
u/app.route('/test') def testroute(): return 'This is a test route'
routes.py
from snapflask import app, crsr, cnxn
from snapflask.User import User
from flask import rendertemplate, redirect, urlfor, flash
from snapflask.forms import RegisterForm, LoginForm
from flasklogin import
/r/flask
https://redd.it/18a0tyd
Python gets its first community communications manager
https://thenewstack.io/python-gets-its-first-community-communications-manager/
/r/Python
https://redd.it/189yek3
https://thenewstack.io/python-gets-its-first-community-communications-manager/
/r/Python
https://redd.it/189yek3
The New Stack
Python Gets Its First Community Communications Manager
Marie Nordin shared her vision for the role — and explained how her mission has its roots in her own journey through the open source 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/18a77w3
# 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/18a77w3
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…
Why use the ORM over standard SQL?
I am learning Django and have an intermediate understanding of SQL. I had previously set up scripts with a cursor in Python to just run SQL queries. I'm wondering why Django has you use the ORM to run SQL statements as opposed to just letting you write them in as is?
For example when creating columns:
name = models.CharField(max_length = 50)
instead of the simpler:name VARCHAR(50)
I am fine learning the ORM, but it seems pointless if I already know SQL. Considering that some of my scripts and views in SQL are 100+ lines long, I am anticipating that this is going to be a needless complication trying to rewrite this in the ORM.
So what is the rationale for using the ORM and why does it make you use it if it's literally just going to convert it to SQL before passing it to the SQL server?
/r/django
https://redd.it/189z57p
I am learning Django and have an intermediate understanding of SQL. I had previously set up scripts with a cursor in Python to just run SQL queries. I'm wondering why Django has you use the ORM to run SQL statements as opposed to just letting you write them in as is?
For example when creating columns:
name = models.CharField(max_length = 50)
instead of the simpler:name VARCHAR(50)
I am fine learning the ORM, but it seems pointless if I already know SQL. Considering that some of my scripts and views in SQL are 100+ lines long, I am anticipating that this is going to be a needless complication trying to rewrite this in the ORM.
So what is the rationale for using the ORM and why does it make you use it if it's literally just going to convert it to SQL before passing it to the SQL server?
/r/django
https://redd.it/189z57p
Reddit
From the django community on Reddit
Explore this post and more from the django community
DateTimeField
I have written a DRF api that spits out data similar to this:
{
"id": 7,
"title": "System Restored",
"description": "A fix has been rolled out and the system is functional again.",
"call_to_action": "None",
"call_to_action_url": "http://www.example.com",
"system_image_name": "checkmark.icloud",
"identifier": "issuefixes",
"pushed_to_user": true,
"created_at": "2023-12-03T06:34:08.428398-08:00"
},
{
"id": 6,
"title": "System Outage",
"description": "We have identified an issue preventing users from saving new paints. We are working on a fix and expect the issue to be resolved in an hour.",
"call_to_action": "View more on Twitter",
/r/django
[https://redd.it/18a6fhc
I have written a DRF api that spits out data similar to this:
{
"id": 7,
"title": "System Restored",
"description": "A fix has been rolled out and the system is functional again.",
"call_to_action": "None",
"call_to_action_url": "http://www.example.com",
"system_image_name": "checkmark.icloud",
"identifier": "issuefixes",
"pushed_to_user": true,
"created_at": "2023-12-03T06:34:08.428398-08:00"
},
{
"id": 6,
"title": "System Outage",
"description": "We have identified an issue preventing users from saving new paints. We are working on a fix and expect the issue to be resolved in an hour.",
"call_to_action": "View more on Twitter",
/r/django
[https://redd.it/18a6fhc
Reddit
From the django community on Reddit
Explore this post and more from the django community
Python module that would operate computer like self operating computer using computer vision
So we have multiple modules like selenium etc that automate the computer / web page interaction. Now, self operating computer script that was just released tries to explain to gpt4 what it is looking at on computer screen with gpt 4 vision and allows it to use the computer according to a prompt.
It seems to me that there should be a module that does the same. Explains to llm what it can do with prompts using mouse / keyboard. Customized to different os's.
So then all we would have to do is load the module and be able to do something similar for our own special needs.
Is anyone working on something like this?
/r/Python
https://redd.it/18aaemr
So we have multiple modules like selenium etc that automate the computer / web page interaction. Now, self operating computer script that was just released tries to explain to gpt4 what it is looking at on computer screen with gpt 4 vision and allows it to use the computer according to a prompt.
It seems to me that there should be a module that does the same. Explains to llm what it can do with prompts using mouse / keyboard. Customized to different os's.
So then all we would have to do is load the module and be able to do something similar for our own special needs.
Is anyone working on something like this?
/r/Python
https://redd.it/18aaemr
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Great examples of multi-language flask apps? looking for inspiration
Greetings! I'm thinking to add multi-language support to https://github.com/dgtlmoon/changedetection.io
What's the typical "best practice" workflow here? Something supporting gettext/.po files, which can be edited in another app, and use those strings in the app itself?
(My dream/idea is to have the language flag available in the app, just like any ordinary website)
Whats some flask based webapps that do this really well, that I could check out for inspiration?
Thanks for your time all!
/r/flask
https://redd.it/189y1nc
Greetings! I'm thinking to add multi-language support to https://github.com/dgtlmoon/changedetection.io
What's the typical "best practice" workflow here? Something supporting gettext/.po files, which can be edited in another app, and use those strings in the app itself?
(My dream/idea is to have the language flag available in the app, just like any ordinary website)
Whats some flask based webapps that do this really well, that I could check out for inspiration?
Thanks for your time all!
/r/flask
https://redd.it/189y1nc
GitHub
GitHub - dgtlmoon/changedetection.io: Best and simplest tool for website change detection, web page monitoring, and website change…
Best and simplest tool for website change detection, web page monitoring, and website change alerts. Perfect for tracking content changes, price drops, restock alerts, and website defacement monito...