I'm being followed by an army of spammy Python accounts on Twitter. What's going on?
Over the last few days a number of suspicious looking accounts have started to follow me on twitter. They all pretend to be some sort of generic Python related account. Yet they all have more or less the same bio and all tweets link to very suspicious websites.
I've blocked and reported all of them, but more and more are coming and I'm seeing legitimate Python accounts following some of them, probably without double checking.
Did anyone else notice this? Does anyone have an idea of what's going on? Should I report this to twitter and if yes how?
Here's a list of the accounts I've seen so far if someone want's to check them out. **Be careful with clicking any of the links in their tweets and bio!**
* [@learn_pythonx](https://www.twitter.com/learn_pythonx)
* [@python_codecs](https://www.twitter.com/python_codecs)
* [@PythonCodeademy](https://www.twitter.com/PythonCodeademy)
* [@The_PythonTutor](https://www.twitter.com/The_PythonTutor)
* [@Python_Codingz](https://www.twitter.com/Python_Codingz)
* [@Python_4coders](https://www.twitter.com/Python_4coders)
* [@Learn_Python_2z](https://www.twitter.com/Learn_Python_2z)
* [@python_0toHero](https://www.twitter.com/python_0toHero)
* [@ThePythonTutor_](https://www.twitter.com/ThePythonTutor_)
* [@python_4coder](https://www.twitter.com/python_4coder)
* [@Python\_Master_](https://www.twitter.com/Python_Master_)
* [@Python_programz](https://www.twitter.com/Python_programz)
* [@pythonbeginner_](https://www.twitter.com/pythonbeginner_)
* [@PythonsTraining](https://www.twitter.com/PythonsTraining)
* [@LearnsPython](https://www.twitter.com/LearnsPython)
* [@PythonDailyNews](https://www.twitter.com/PythonDailyNews)
* [@python_news_4u](https://www.twitter.com/python_news_4u)
* [@python\_academy_](https://www.twitter.com/python_academy_)
* [@pythonmaster_](https://www.twitter.com/pythonmaster_)
* [@PythonDev_AtoZ](https://www.twitter.com/PythonDev_AtoZ)
* [@LearnPython_toZ](https://www.twitter.com/LearnPython_toZ)
* [@Python_AtoZ](https://www.twitter.com/Python_AtoZ)
* [@Python4Tutorial](https://www.twitter.com/Python4Tutorial)
/r/Python
https://redd.it/7wl2hc
Over the last few days a number of suspicious looking accounts have started to follow me on twitter. They all pretend to be some sort of generic Python related account. Yet they all have more or less the same bio and all tweets link to very suspicious websites.
I've blocked and reported all of them, but more and more are coming and I'm seeing legitimate Python accounts following some of them, probably without double checking.
Did anyone else notice this? Does anyone have an idea of what's going on? Should I report this to twitter and if yes how?
Here's a list of the accounts I've seen so far if someone want's to check them out. **Be careful with clicking any of the links in their tweets and bio!**
* [@learn_pythonx](https://www.twitter.com/learn_pythonx)
* [@python_codecs](https://www.twitter.com/python_codecs)
* [@PythonCodeademy](https://www.twitter.com/PythonCodeademy)
* [@The_PythonTutor](https://www.twitter.com/The_PythonTutor)
* [@Python_Codingz](https://www.twitter.com/Python_Codingz)
* [@Python_4coders](https://www.twitter.com/Python_4coders)
* [@Learn_Python_2z](https://www.twitter.com/Learn_Python_2z)
* [@python_0toHero](https://www.twitter.com/python_0toHero)
* [@ThePythonTutor_](https://www.twitter.com/ThePythonTutor_)
* [@python_4coder](https://www.twitter.com/python_4coder)
* [@Python\_Master_](https://www.twitter.com/Python_Master_)
* [@Python_programz](https://www.twitter.com/Python_programz)
* [@pythonbeginner_](https://www.twitter.com/pythonbeginner_)
* [@PythonsTraining](https://www.twitter.com/PythonsTraining)
* [@LearnsPython](https://www.twitter.com/LearnsPython)
* [@PythonDailyNews](https://www.twitter.com/PythonDailyNews)
* [@python_news_4u](https://www.twitter.com/python_news_4u)
* [@python\_academy_](https://www.twitter.com/python_academy_)
* [@pythonmaster_](https://www.twitter.com/pythonmaster_)
* [@PythonDev_AtoZ](https://www.twitter.com/PythonDev_AtoZ)
* [@LearnPython_toZ](https://www.twitter.com/LearnPython_toZ)
* [@Python_AtoZ](https://www.twitter.com/Python_AtoZ)
* [@Python4Tutorial](https://www.twitter.com/Python4Tutorial)
/r/Python
https://redd.it/7wl2hc
Twitter
Learn Python (@learn_pythonx) | Twitter
The latest Tweets from Learn Python (@learn_pythonx). Here to share events, tutorials, courses, books... related to #python #django #flask #programming #code #webdev #development. England, United Kingdom
Using SelectFields with flask-wtforms !HELP!
I'm having issues using Select Field in flask . I'm unable to submit get data from the select fields , also when i use them with normal input fields none of the fields return any data . But the input fields work and return data if I remove the selectFields . Here's the code :
Models and form :
class City(db.Model):
id = db.Column(db.Integer, primary\_key=True)
city = db.Column(db.String(30), unique=True, nullable=False)
state = db.Column(db.String(30), nullable=False)
country = db.Column(db.String(30), nullable=False)
class CityForm(FlaskForm):
city = StringField('city', validators=\[InputRequired()\])
state = SelectField('state' , validators=\[InputRequired()\] , coerce = str)
country = SelectField('country' , validators=\[InputRequired()\] , coerce = str)
the select fields are populated in the views , like this :
form\_city.state.choices = \[(row\[0\],row\[0\]) for row in db.session.query(login\_model.State.state)\]
form\_city.country.choices = \[(row\[0\],row\[0\]) for row in db.session.query(login\_model.Country.country)\]
\~\~\~\~\~
if form\_city.validate\_on\_submit():
mssg = ""
prod = login\_model.City.query.filter\_by(city=form\_city.city.data).first()
print('okaaay')
if prod :
mssg = "Duplicate Data "
flash(mssg)
return redirect(url\_for('basic\_master'))
else:
new\_data = login\_model.City(city=form\_city.city.data.upper())
try:
db.session.add(new\_data)
db.session.commit()
mssg = "Data Successfully added 👍"
flash(mssg)
return redirect(url\_for('basic\_master'))
except Exception as e:
mssg = "Error occured while adding data 😵. Here's the error : "+str(e)
flash(mssg)
return redirect(url\_for('basic\_master'))
Nothing works if I have selectfields in my Form class , and If i remove them the normal input field works .
Any help is much appreciated thanks.
\#flask #sqlalchemy #wtforms #python
/r/flask
https://redd.it/8srquo
I'm having issues using Select Field in flask . I'm unable to submit get data from the select fields , also when i use them with normal input fields none of the fields return any data . But the input fields work and return data if I remove the selectFields . Here's the code :
Models and form :
class City(db.Model):
id = db.Column(db.Integer, primary\_key=True)
city = db.Column(db.String(30), unique=True, nullable=False)
state = db.Column(db.String(30), nullable=False)
country = db.Column(db.String(30), nullable=False)
class CityForm(FlaskForm):
city = StringField('city', validators=\[InputRequired()\])
state = SelectField('state' , validators=\[InputRequired()\] , coerce = str)
country = SelectField('country' , validators=\[InputRequired()\] , coerce = str)
the select fields are populated in the views , like this :
form\_city.state.choices = \[(row\[0\],row\[0\]) for row in db.session.query(login\_model.State.state)\]
form\_city.country.choices = \[(row\[0\],row\[0\]) for row in db.session.query(login\_model.Country.country)\]
\~\~\~\~\~
if form\_city.validate\_on\_submit():
mssg = ""
prod = login\_model.City.query.filter\_by(city=form\_city.city.data).first()
print('okaaay')
if prod :
mssg = "Duplicate Data "
flash(mssg)
return redirect(url\_for('basic\_master'))
else:
new\_data = login\_model.City(city=form\_city.city.data.upper())
try:
db.session.add(new\_data)
db.session.commit()
mssg = "Data Successfully added 👍"
flash(mssg)
return redirect(url\_for('basic\_master'))
except Exception as e:
mssg = "Error occured while adding data 😵. Here's the error : "+str(e)
flash(mssg)
return redirect(url\_for('basic\_master'))
Nothing works if I have selectfields in my Form class , and If i remove them the normal input field works .
Any help is much appreciated thanks.
\#flask #sqlalchemy #wtforms #python
/r/flask
https://redd.it/8srquo
reddit
r/flask - Using SelectFields with flask-wtforms !HELP!
1 votes and 3 so far on reddit
Flask-JWT-Extended looking for maintainers.
I am looking to get a couple maintainers for flask-jwt-extended and the sister project, flask-jwt-simple. I will still be actively maintaining this repo as well, but I want to make sure it never ends up abandoned (like flask-jwt), and have safeguards in the off chance that I get hit by a bus :)
The primary responsibilities of a maintainer would be code reviews and helping with issues that come in. All these are pretty low traffic so it shouldn't be much work. If you're interested or have more questions, please let me know in https://github.com/vimalloc/flask-jwt-extended/issues/194 or in the #flask-jwt-extended irc channel on freenode.
Cheers 👍
/r/Python
https://redd.it/9gc7s4
I am looking to get a couple maintainers for flask-jwt-extended and the sister project, flask-jwt-simple. I will still be actively maintaining this repo as well, but I want to make sure it never ends up abandoned (like flask-jwt), and have safeguards in the off chance that I get hit by a bus :)
The primary responsibilities of a maintainer would be code reviews and helping with issues that come in. All these are pretty low traffic so it shouldn't be much work. If you're interested or have more questions, please let me know in https://github.com/vimalloc/flask-jwt-extended/issues/194 or in the #flask-jwt-extended irc channel on freenode.
Cheers 👍
/r/Python
https://redd.it/9gc7s4
GitHub
Looking for additional maintainers #194
First off, my current involvement of this project is not going to change, I will still be actively maintaining it. I am however looking to get a couple other maintainers for this project and the sister project, flask-jwt-simple. When I f...
Initializing a Flask app
[https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world)
With the above tutorial an `app` package is created. For the `__init__.py` file, `Flask` is instantiated in there:
app/__init__.py: Flask application instance
from flask import Flask
app = Flask(__name__)
from app import routes
Why is that written in \`\_\_init\_\_.py\` and what is the benefit of that? As opposed to an empty `__init__.py` and then instantiating the `Flask` class in another module such as...
app/main_app.py #Flask is instantiated here instead of __init__.py
from flask import Flask
app = Flask(__name__)
​
/r/flask
https://redd.it/aqoq8m
[https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world)
With the above tutorial an `app` package is created. For the `__init__.py` file, `Flask` is instantiated in there:
app/__init__.py: Flask application instance
from flask import Flask
app = Flask(__name__)
from app import routes
Why is that written in \`\_\_init\_\_.py\` and what is the benefit of that? As opposed to an empty `__init__.py` and then instantiating the `Flask` class in another module such as...
app/main_app.py #Flask is instantiated here instead of __init__.py
from flask import Flask
app = Flask(__name__)
​
/r/flask
https://redd.it/aqoq8m
Miguelgrinberg
The Flask Mega-Tutorial, Part I: Hello, World!
You are reading the 2024 edition of the Flask Mega-Tutorial. The complete course is also available to order in e-book and paperback formats from Amazon. Thank you for your support!If you are looking…
Need clarification regarding 'g' in Flask
[http://flask.pocoo.org/docs/1.0/api/#flask.g](http://flask.pocoo.org/docs/1.0/api/#flask.g)
In trying to interpret the usage of **g** in Flask *as a novice*, I'm reading that it's an object to store data for the duration of an application context.
* *What types of data should be stored under this object?*
* *Why would the data be better suited under this object namespace? Rather, why not just explicitly call out what is needed at the application level? (An example being g.db.connect() vs database.connect())*
Please provide details/explanations on how to make the best use of this object.
/r/flask
https://redd.it/bub9pk
[http://flask.pocoo.org/docs/1.0/api/#flask.g](http://flask.pocoo.org/docs/1.0/api/#flask.g)
In trying to interpret the usage of **g** in Flask *as a novice*, I'm reading that it's an object to store data for the duration of an application context.
* *What types of data should be stored under this object?*
* *Why would the data be better suited under this object namespace? Rather, why not just explicitly call out what is needed at the application level? (An example being g.db.connect() vs database.connect())*
Please provide details/explanations on how to make the best use of this object.
/r/flask
https://redd.it/bub9pk
reddit
r/flask - Need clarification regarding 'g' in Flask
8 votes and 3 comments so far on Reddit
New Fask library to make uploading, storing & streaming files easy!
Hi guys
I have just finished work on a new Flask library to make uploading files and storing them on your server & database as easy as possible... just let Flask-File-Upload handle all the repetitive work!
Works with Flask & Flask-SQLAlchemy
[https://github.com/joegasewicz/Flask-File-Upload](https://github.com/joegasewicz/Flask-File-Upload)
​
I would be very grateful if anyone wishes to try out this library & or give some feed back. And of course contributions are welcome!
Thanks so much
Joe
​
https://preview.redd.it/ppd6fr092g941.jpg?width=2200&format=pjpg&auto=webp&s=9fe80a5d18d313158672805eddb42edbfd1de506
\#python #flask #sqlalchemy
/r/flask
https://redd.it/elk36d
Hi guys
I have just finished work on a new Flask library to make uploading files and storing them on your server & database as easy as possible... just let Flask-File-Upload handle all the repetitive work!
Works with Flask & Flask-SQLAlchemy
[https://github.com/joegasewicz/Flask-File-Upload](https://github.com/joegasewicz/Flask-File-Upload)
​
I would be very grateful if anyone wishes to try out this library & or give some feed back. And of course contributions are welcome!
Thanks so much
Joe
​
https://preview.redd.it/ppd6fr092g941.jpg?width=2200&format=pjpg&auto=webp&s=9fe80a5d18d313158672805eddb42edbfd1de506
\#python #flask #sqlalchemy
/r/flask
https://redd.it/elk36d
GitHub
joegasewicz/flask-file-upload
Easy file uploads for Flask. Contribute to joegasewicz/flask-file-upload development by creating an account on GitHub.
A new Flask library to help make authenticating users super easy! Login users with ease :)
I'm releasing v0.1.0 this weekend of a Flask library that helps to make logging in users super easy!
If you want to develop Flasks app's fast & not spend all your time solving authorisation of all your resources / requests, then maybe this library can be useful for you..
Works out of the box with Flask-SQLAlchemy, so after you set up a user model with Flask-JWT-Router you no longer have to worry about handling any authenticating of that user or authorising routes associated with that users allowed resource access...
[https://github.com/joegasewicz/flask-jwt-router](https://github.com/joegasewicz/flask-jwt-router)
Could be useful for SPA's like AngularJS & ReactJS
Thank you very much for your time,
Joe
https://preview.redd.it/p8mxk63zm7e41.png?width=2506&format=png&auto=webp&s=0e231bc93f36b1f31557ea3e88627e50fe1bdf44
​
\#Python #ReactJS #Flask #SLQAlchemy #JWT
/r/flask
https://redd.it/ewy5sm
I'm releasing v0.1.0 this weekend of a Flask library that helps to make logging in users super easy!
If you want to develop Flasks app's fast & not spend all your time solving authorisation of all your resources / requests, then maybe this library can be useful for you..
Works out of the box with Flask-SQLAlchemy, so after you set up a user model with Flask-JWT-Router you no longer have to worry about handling any authenticating of that user or authorising routes associated with that users allowed resource access...
[https://github.com/joegasewicz/flask-jwt-router](https://github.com/joegasewicz/flask-jwt-router)
Could be useful for SPA's like AngularJS & ReactJS
Thank you very much for your time,
Joe
https://preview.redd.it/p8mxk63zm7e41.png?width=2506&format=png&auto=webp&s=0e231bc93f36b1f31557ea3e88627e50fe1bdf44
​
\#Python #ReactJS #Flask #SLQAlchemy #JWT
/r/flask
https://redd.it/ewy5sm
GitHub
GitHub - joegasewicz/flask-jwt-router: Flask JWT Router is a Python library that adds authorised routes to a Flask app.
Flask JWT Router is a Python library that adds authorised routes to a Flask app. - GitHub - joegasewicz/flask-jwt-router: Flask JWT Router is a Python library that adds authorised routes to a Flask...
Deploying Flask on Google Cloud with IAP | (Identity Aware Proxy) in 5 minutes
https://youtu.be/LKoFKS8Y5v4
/r/flask
https://redd.it/hdbrza
https://youtu.be/LKoFKS8Y5v4
/r/flask
https://redd.it/hdbrza
YouTube
Deploying Flask on Google Cloud with IAP | (Identity Aware Proxy) in 5 minutes
Deploying Flask on Google Cloud with IAP | (Identity Aware Proxy) in 5 minutes
#Flask #Google Cloud
-~-~~-~~~-~~-~-
Please watch: "LRU Cache (With Python Code) "
https://www.youtube.com/watch?v=oXHLu4WCs9I
-~-~~-~~~-~~-~-
#Flask #Google Cloud
-~-~~-~~~-~~-~-
Please watch: "LRU Cache (With Python Code) "
https://www.youtube.com/watch?v=oXHLu4WCs9I
-~-~~-~~~-~~-~-
FlaskEase - Flask extension for creating REST APIs and OpenAPI docs with ease, inspired from FastAPI.
Yet another [\#Flask](https://twitter.com/hashtag/Flask?src=hashtag_click) REST API extension(mine is experimental) -> [https://github.com/zero-shubham/flask-ease](https://github.com/zero-shubham/flask-ease) inspired from [@tiangolo](https://twitter.com/tiangolo)'s [\#Fastapi](https://twitter.com/hashtag/Fastapi?src=hashtag_click)
/r/flask
https://redd.it/hp6rha
Yet another [\#Flask](https://twitter.com/hashtag/Flask?src=hashtag_click) REST API extension(mine is experimental) -> [https://github.com/zero-shubham/flask-ease](https://github.com/zero-shubham/flask-ease) inspired from [@tiangolo](https://twitter.com/tiangolo)'s [\#Fastapi](https://twitter.com/hashtag/Fastapi?src=hashtag_click)
/r/flask
https://redd.it/hp6rha
Twitter
#flask hashtag on Twitter
See Tweets about #flask on Twitter. See what people are saying and join the conversation.
That's it, today I published the last episode for the Flask series, a full-featured web application built with Python including Authentication System. And most important, over 6 hours of deep explanations for you to start developing websites with Python!
https://youtube.com/watch?v=ByNEqsh7I4Q&feature=share
/r/flask
https://redd.it/l3zoc3
https://youtube.com/watch?v=ByNEqsh7I4Q&feature=share
/r/flask
https://redd.it/l3zoc3
YouTube
Flask Full Series - Web Application Development with Python - Item Selling - Episode 16 | FINAL EP.
Flask Python
#Flask #Python #FlaskTutorial
👍Welcome to my Python Flask tutorial
In this episode, we will complete the algorithm for item selling, it is going to be quite similar to what we have configured for item purchasing, so I cover this topic a little…
#Flask #Python #FlaskTutorial
👍Welcome to my Python Flask tutorial
In this episode, we will complete the algorithm for item selling, it is going to be quite similar to what we have configured for item purchasing, so I cover this topic a little…
I created a tutorial on how to deploy a Flask application with docker-compose to production, it will be a series with three parts, here is the first one where we are getting started :)
https://youtube.com/watch?v=p0HnnJ6CusM&feature=share
/r/flask
https://redd.it/mak2fk
https://youtube.com/watch?v=p0HnnJ6CusM&feature=share
/r/flask
https://redd.it/mak2fk
YouTube
Python Web Application Deployment Tutorial - Using Docker & Docker Compose - Part 1
#Flask #Docker #DockerCompose #PythonWelcome to a new series about Flask and Docker combined! In this video, you will learn the best practices to deploy your...
Session Cookies for protected routes/pages - How secure is it?
Flask has build-in Session handler (https://flask.palletsprojects.com/en/1.1.x/api/#flask.session). I use the Firebase Authentication SDK to login users, set a client session cookie to i.e. session['login'\] = true (and might add an expiration time) and check on each protected page request if get.session('login) == True. The cookie can't be modified, as it's signed on the server.
Why should I use additional frameworks like JWT and submit a Bearer Token with each request? I don't see any security issues with the session cookies I'm already using.
/r/flask
https://redd.it/n89r4m
Flask has build-in Session handler (https://flask.palletsprojects.com/en/1.1.x/api/#flask.session). I use the Firebase Authentication SDK to login users, set a client session cookie to i.e. session['login'\] = true (and might add an expiration time) and check on each protected page request if get.session('login) == True. The cookie can't be modified, as it's signed on the server.
Why should I use additional frameworks like JWT and submit a Bearer Token with each request? I don't see any security issues with the session cookies I'm already using.
/r/flask
https://redd.it/n89r4m
reddit
Session Cookies for protected routes/pages - How secure is it?
Flask has build-in Session handler ...
Keep Python state across Flask requests (stateful API)
I've got a Flask endpoint that calls a Flask (API) endpoint (with AJAX) when the user clicks a button.
The API endpoint gets data from a (Postgres) database.
So, server-side, something like:
But I want the API to be stateful (non-REST), where the state is kept by the server.
The state contains the following:
- A Postgres connection
- A Postgres cursor (containing the results from an expensive query)
- A counter
So I open a Postgres connection and store it in `flask.g`:
And I'm also storing the Postgres the cursor and the counter in
Now, I'm storing the database connection in
/r/flask
https://redd.it/q877nd
I've got a Flask endpoint that calls a Flask (API) endpoint (with AJAX) when the user clicks a button.
The API endpoint gets data from a (Postgres) database.
So, server-side, something like:
import flask
import psycopg2 # postgres wrapper
app = flask.Flask(__name__)
@app.get('/search')
def search():
return flask.render_template('search.html')
@app.get('api')
def api():
db = db_get()
cur = db.cursor()
cur.execute('SELECT * FROM table0 OFFSET 0')
return flask.jsonify(cur.fetchmany(3))
But I want the API to be stateful (non-REST), where the state is kept by the server.
The state contains the following:
- A Postgres connection
- A Postgres cursor (containing the results from an expensive query)
- A counter
So I open a Postgres connection and store it in `flask.g`:
def db_get(): # taken from https://flask.palletsprojects.com/en/2.0.x/tutorial/database/
if 'db' not in flask.g:
flask.g.db = psycopg2.connect(f'host={PSQL_HOST} port={PSQL_PORT} dbname={PSQL_DBNAME} user={PSQL_USER} password={PSQL_PASSWORD} connect_timeout=60')
return flask.g.db
And I'm also storing the Postgres the cursor and the counter in
g:@app.get('api')
def api():
if 'count' not in flask.g: flask.g.count = 0
if 'cur' not in flask.g:
flask.g.cur = db_get().cursor(name='name')
flask.g.cur.execute("SELECT * FROM table0 OFFSET %s LIMIT 1000000", [3*flask.current_app.count])
flask.g.count += 1
return flask.jsonify(flask.g.cur.fetchmany(3))
Now, I'm storing the database connection in
g because/r/flask
https://redd.it/q877nd