Deploy your Flask API to any Serverless Cloud using this Simple Pattern
https://andrewgriffithsonline.com/blog/180412-deploy-flask-api-any-serverless-cloud-platform
/r/Python
https://redd.it/8cdzq3
https://andrewgriffithsonline.com/blog/180412-deploy-flask-api-any-serverless-cloud-platform
/r/Python
https://redd.it/8cdzq3
reddit
Deploy your Flask API to any Serverless Cloud using... • r/Python
2 points and 0 comments so far on reddit
How should I approach Django to make the learning process less overwhelming?
This is another attempt of mine to learn Django. Since there seems to be nothing better than the official Polls tutorial, I have decided to stick with it. No doubt, it's written in a succinct and user-friendly manner. And yet, Django seems so powerful and huge that I get frustrated. Is it okay that things don't click in my head yet?
Do I need to make sure that I understand everything in every particular part of the tutorial to proceed with the next?
/r/djangolearning
https://redd.it/8cdqqe
This is another attempt of mine to learn Django. Since there seems to be nothing better than the official Polls tutorial, I have decided to stick with it. No doubt, it's written in a succinct and user-friendly manner. And yet, Django seems so powerful and huge that I get frustrated. Is it okay that things don't click in my head yet?
Do I need to make sure that I understand everything in every particular part of the tutorial to proceed with the next?
/r/djangolearning
https://redd.it/8cdqqe
reddit
How should I approach Django to make the... • r/djangolearning
This is another attempt of mine to learn Django. Since there seems to be nothing better than the official Polls tutorial, I have decided to stick...
Deploying a Django Application on Ubuntu VPS using Gunicorn, MySQL and NGINX (tutorial)
https://www.shellvoide.com/hacks/installing-django-application-with-nginx-mysql-and-gunicorn-on-ubuntu-vps/
/r/django
https://redd.it/8cey0z
https://www.shellvoide.com/hacks/installing-django-application-with-nginx-mysql-and-gunicorn-on-ubuntu-vps/
/r/django
https://redd.it/8cey0z
[Python for Microcontrollers] Zerynth r2.1.1 is out with support for JTAG, new boards and IoT libraries
https://community.zerynth.com/t/zerynth-r2-1-1-is-out-with-support-for-jtag-and-customizable-vms-for-your-own-hardware-solutions/1155
/r/Python
https://redd.it/8ceooz
https://community.zerynth.com/t/zerynth-r2-1-1-is-out-with-support-for-jtag-and-customizable-vms-for-your-own-hardware-solutions/1155
/r/Python
https://redd.it/8ceooz
ZERYNTH Community
Zerynth r2.1.1 is out with support for JTAG and customizable VMs for your own hardware solutions!
Hey there, we have just released the version r2.1.1 of Zerynth with lots of new features, enhancements and optimisations. A detailed list of changes follows. - Support for JTAG! We finally added support for JTAG probes! This is an important feature for…
Does the data persist in a redis database?
I am going to be using rabbitmq as a message broker and Redis as results backend for a flask app. I signed up for redis labs and on the free version, you get 30 MB of storage.
The use case will be pulling data from some api's on data.gov and then loading the data into a website asynchronously. The data that is pulled isn't that large, maybe ~few hundred kB. However, over time I could max out my limit. Or does redis(labs) only keep that data for a certain period of time and then it get's deleted?
/r/flask
https://redd.it/8cab9h
I am going to be using rabbitmq as a message broker and Redis as results backend for a flask app. I signed up for redis labs and on the free version, you get 30 MB of storage.
The use case will be pulling data from some api's on data.gov and then loading the data into a website asynchronously. The data that is pulled isn't that large, maybe ~few hundred kB. However, over time I could max out my limit. Or does redis(labs) only keep that data for a certain period of time and then it get's deleted?
/r/flask
https://redd.it/8cab9h
reddit
Does the data persist in a redis database? • r/flask
I am going to be using rabbitmq as a message broker and Redis as results backend for a flask app. I signed up for redis labs and on the free...
TIL that starting from 3.7 dicts are officially ordered
Since 3.6 [dicts preserve order because of the new “compact” representation](https://docs.python.org/3.6/whatsnew/3.6.html#whatsnew36-compactdict) but it was just an implementation detail and we were told not to rely on it.
But in 3.7 dicts **officially** became ordered:
> Performing `list(d)` on a dictionary returns a list of all the keys used in the dictionary, **in insertion order**
(from https://docs.python.org/3.7/tutorial/datastructures.html#dictionaries)
TBH, I'm not sure that this is a good idea. I can see a number of problems with this change in future:
1. Now people will start relying on the order of elements in a dict and if Python developers want to change the implementation in future they will **have to** preserve the order as well.
2. It forces developers of other Python interpreters to implement this feature as well even if it will cost them some additional work or decrease performance.
3. It makes `collections.OrderedDict` redundant which could lead to confusion.
What do you think about this decision? Why do you think they made it?
/r/Python
https://redd.it/8cf4rf
Since 3.6 [dicts preserve order because of the new “compact” representation](https://docs.python.org/3.6/whatsnew/3.6.html#whatsnew36-compactdict) but it was just an implementation detail and we were told not to rely on it.
But in 3.7 dicts **officially** became ordered:
> Performing `list(d)` on a dictionary returns a list of all the keys used in the dictionary, **in insertion order**
(from https://docs.python.org/3.7/tutorial/datastructures.html#dictionaries)
TBH, I'm not sure that this is a good idea. I can see a number of problems with this change in future:
1. Now people will start relying on the order of elements in a dict and if Python developers want to change the implementation in future they will **have to** preserve the order as well.
2. It forces developers of other Python interpreters to implement this feature as well even if it will cost them some additional work or decrease performance.
3. It makes `collections.OrderedDict` redundant which could lead to confusion.
What do you think about this decision? Why do you think they made it?
/r/Python
https://redd.it/8cf4rf
Python documentation
What’s New In Python 3.6
Editors, Elvis Pranskevichus < elvis@magic.io>, Yury Selivanov < yury@magic.io>,. This article explains the new features in Python 3.6, compared to 3.5. Python 3.6 was released on December 23, 2016...
Database design (lots of columns / fields)
I currently have a model that has over 100 fields on it. I'm not sure the best way on how to optimise this. The options i've thought of so far:
1. Keep as is and use `Model.objects.only('field1', 'field2')` with each query i make
2. Have a main model then have a 2nd "Data" model that one to ones with the main model then query the extra data that way.
3. Convert a lot of the columns to be able to be stored in a single PSQL JSON column, i'm not sure if this causes filter / index issues down the lines as a decent amount of the columns are indexable.
Is there another option that is better than any of these 3 or which of the 3 would give me the most flexibility going forward?
Edit**
My data is coming from an external source which looks like: https://gist.github.com/dan-gamble/fac2becbd56dc6fe88f281a64823a2f4
Some of the keys i don't need so they got dropped, the Nation / League / Club all are FK's to another object. The rest is currently stored on a `Player` model. The columns that have a value assigned to them are stats and can be filtered on.
/r/django
https://redd.it/8cfr2q
I currently have a model that has over 100 fields on it. I'm not sure the best way on how to optimise this. The options i've thought of so far:
1. Keep as is and use `Model.objects.only('field1', 'field2')` with each query i make
2. Have a main model then have a 2nd "Data" model that one to ones with the main model then query the extra data that way.
3. Convert a lot of the columns to be able to be stored in a single PSQL JSON column, i'm not sure if this causes filter / index issues down the lines as a decent amount of the columns are indexable.
Is there another option that is better than any of these 3 or which of the 3 would give me the most flexibility going forward?
Edit**
My data is coming from an external source which looks like: https://gist.github.com/dan-gamble/fac2becbd56dc6fe88f281a64823a2f4
Some of the keys i don't need so they got dropped, the Nation / League / Club all are FK's to another object. The rest is currently stored on a `Player` model. The columns that have a value assigned to them are stats and can be filtered on.
/r/django
https://redd.it/8cfr2q
Gist
player.json
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
Develop your first ETL job in Python using bonobo
http://blog.adnansiddiqi.me/develop-your-first-etl-job-in-python-using-bonobo/?utm_source=c_r_python&utm_medium=reddit&utm_campaign=c_r_python_bonobo
/r/Python
https://redd.it/8cfkdp
http://blog.adnansiddiqi.me/develop-your-first-etl-job-in-python-using-bonobo/?utm_source=c_r_python&utm_medium=reddit&utm_campaign=c_r_python_bonobo
/r/Python
https://redd.it/8cfkdp
Adnan's Random bytes
Develop your first ETL job in Python using bonobo
Learn to write simple ETL jobs in Python by using Bonobo library.
Updating Plotly Version in Python
I am having trouble trying to update to the latest Plotly version of 2.5.1. I have tried using the methods below in terminal for my Mac, but whenever I check Jupyter, my version is still 2.3.0.
pip install plotly==2.5.1
pip install plotly --upgrade
/r/IPython
https://redd.it/8cgqfq
I am having trouble trying to update to the latest Plotly version of 2.5.1. I have tried using the methods below in terminal for my Mac, but whenever I check Jupyter, my version is still 2.3.0.
pip install plotly==2.5.1
pip install plotly --upgrade
/r/IPython
https://redd.it/8cgqfq
reddit
Updating Plotly Version in Python • r/IPython
I am having trouble trying to update to the latest Plotly version of 2.5.1. I have tried using the methods below in terminal for my Mac, but...
How do I join a model after using `.objects.values()`?
I'm making a custom Django `manage.py` command. Here is the part of it relevant to my question.
Model = apps.get_model(app_label="my_app", model_name="MyModel")
x = Model.objects.values(*options["fields"].split('|')):
I want to join `Model` with another model, `SomeOtherModel`. `Model` has a foreign key field named `fk` that connects to the primary key for `SomeOtherModel`. How do I modify my code above to join `Model` with `SomeOtherModel`? Or should I join before running `objects.values()`?
/r/django
https://redd.it/8chxuj
I'm making a custom Django `manage.py` command. Here is the part of it relevant to my question.
Model = apps.get_model(app_label="my_app", model_name="MyModel")
x = Model.objects.values(*options["fields"].split('|')):
I want to join `Model` with another model, `SomeOtherModel`. `Model` has a foreign key field named `fk` that connects to the primary key for `SomeOtherModel`. How do I modify my code above to join `Model` with `SomeOtherModel`? Or should I join before running `objects.values()`?
/r/django
https://redd.it/8chxuj
reddit
How do I join a model after using `.objects.values()`? • r/django
I'm making a custom Django `manage.py` command. Here is the part of it relevant to my question. Model = apps.get_model(app_label="my_app",...
Python for Good
I wanted to let everyone know about Python for Good, a Python event that is happening in the Portland, Oregon area. Put simply, we get a bunch of pythonistas (along with anyone else interested in doing good) and we gather for a long weekend (Thurs - Sun) of using our awesome skills to build apps for social and civic good organizations. Our theme for this year is children and families and some of the places we'll be helping this year include a homeless shelter, numerous organizations that help children, and many more amazing and worthwhile organizations.
The event is all inclusive, meaning that we stay in university dorms, all the food is provided and we have pretty great internet too. Our days are filled with hacking and our evenings are full of excellent camaraderie -- playing boardgames, video games, karaoke, werewolf, cards and lots of excellent socializing!
We are excited to announce that we're going to be once again holding the event at Reed College from July 26th to the 29th.
You can find more information about this years' event here: http://pythonforgood.org/attend Here is a list of the most frequently asked questions here: http://pythonforgood.io/faq
I'd be delighted to answer any questions.
Happiness,
Sean (and the Python for Good team)
/r/Python
https://redd.it/8ciq36
I wanted to let everyone know about Python for Good, a Python event that is happening in the Portland, Oregon area. Put simply, we get a bunch of pythonistas (along with anyone else interested in doing good) and we gather for a long weekend (Thurs - Sun) of using our awesome skills to build apps for social and civic good organizations. Our theme for this year is children and families and some of the places we'll be helping this year include a homeless shelter, numerous organizations that help children, and many more amazing and worthwhile organizations.
The event is all inclusive, meaning that we stay in university dorms, all the food is provided and we have pretty great internet too. Our days are filled with hacking and our evenings are full of excellent camaraderie -- playing boardgames, video games, karaoke, werewolf, cards and lots of excellent socializing!
We are excited to announce that we're going to be once again holding the event at Reed College from July 26th to the 29th.
You can find more information about this years' event here: http://pythonforgood.org/attend Here is a list of the most frequently asked questions here: http://pythonforgood.io/faq
I'd be delighted to answer any questions.
Happiness,
Sean (and the Python for Good team)
/r/Python
https://redd.it/8ciq36
Solid examples using *args and **kwargs
I have seen these in various snippets of code. I am looking for some really good use case examples.
/r/Python
https://redd.it/8ci7qw
I have seen these in various snippets of code. I am looking for some really good use case examples.
/r/Python
https://redd.it/8ci7qw
reddit
Solid examples using *args and **kwargs • r/Python
I have seen these in various snippets of code. I am looking for some really good use case examples.
Flask-Restful API Help? POST method is not allowed
Hi,
I created a Flask-Restful API but when creating a post method like so
class Create(Resource):
def post(self):
etc etc
api.add_resource(Create,api/Create)
It errors out saying the method is not allowed.. but it works when I have something like this
@app.route("/signup/<username>,<password>", methods = ['GET', 'POST'])
def signup(username, password):
Can anybody assist? How do I allow the POST method using the first method?
/r/flask
https://redd.it/8chql1
Hi,
I created a Flask-Restful API but when creating a post method like so
class Create(Resource):
def post(self):
etc etc
api.add_resource(Create,api/Create)
It errors out saying the method is not allowed.. but it works when I have something like this
@app.route("/signup/<username>,<password>", methods = ['GET', 'POST'])
def signup(username, password):
Can anybody assist? How do I allow the POST method using the first method?
/r/flask
https://redd.it/8chql1
reddit
Flask-Restful API Help? POST method is not allowed • r/flask
Hi, I created a Flask-Restful API but when creating a post method like so class Create(Resource): def post(self): etc...
Single Page Apps with Flask and Angular 4|5 Tutorial Series
https://www.techiediaries.com/flask-angular-tutorial/
/r/flask
https://redd.it/8cm0hi
https://www.techiediaries.com/flask-angular-tutorial/
/r/flask
https://redd.it/8cm0hi
Techiediaries
Single Page Apps with Flask and Angular 4|5 Tutorial Series | Techiediaries
In this tutorial series we'll be using Python, Flask, SQLAlchemy and Angular 5 to build a modern RESTful web application with an architecture that consists of a front-end application with Angular 5 and a back-end REST API using Flask.
A Continuous Integration/Deployment (CI/CD) system for Django, using GitHub, Codeship, and AWS
https://diagramy.com/diagram/18af2ef2-736e-4fd2-afcb-b4ee02f1da73/
/r/django
https://redd.it/8cmplx
https://diagramy.com/diagram/18af2ef2-736e-4fd2-afcb-b4ee02f1da73/
/r/django
https://redd.it/8cmplx
Diagramy
Django CI/CD System
This diagram shows a Django CI/CD system. The system uses GitHub and Codeship to quickly deploy new software releases to infrastructure running on ...
Requesting User details from JWT in Django OAuth Toolkit
https://theleakycauldronblog.com/blog/requesting-user-details-from-jwt-in-django-oauth-toolkit/
/r/djangolearning
https://redd.it/8cl6ei
https://theleakycauldronblog.com/blog/requesting-user-details-from-jwt-in-django-oauth-toolkit/
/r/djangolearning
https://redd.it/8cl6ei
Theleakycauldronblog
Requesting User details from JWT in Django OAuth Toolkit
Learn to write an API to fetch the details of currently logged in user, using the Authorization Token, in Django Oauth Toolkit
PyPi is currently experiencing downtime due to an upgrade gone wrong
https://status.python.org
/r/Python
https://redd.it/8cojrq
https://status.python.org
/r/Python
https://redd.it/8cojrq
status.python.org
Python Infrastructure Status
Welcome to Python Infrastructure's home for real-time and historical data on system performance.
Ethereum Smart Contracts in Python: a comprehensive(ish) guide
https://medium.com/m/global-identity?redirectUrl=https://hackernoon.com/ethereum-smart-contracts-in-python-a-comprehensive-ish-guide-771b03990988
/r/Python
https://redd.it/8cmmx5
https://medium.com/m/global-identity?redirectUrl=https://hackernoon.com/ethereum-smart-contracts-in-python-a-comprehensive-ish-guide-771b03990988
/r/Python
https://redd.it/8cmmx5
Hacker Noon
Ethereum Smart Contracts in Python: a comprehensive(ish) guide
It’s one thing to get a basic smart contract up on Ethereum — just google “ERC20 Token Tutorial” you’ll find plenty of information on how…