In Part 2 of this series, you added the ability to save changes made through the REST API to a database using SQLAlchemy and learned how to serialize that data for the REST API using Marshmallow. Connecting the REST API to a database so that the application can make changes to existing data and create […]
Category: APIs
Quick Tip: Consuming Google Search results to use for web scraping
While working on a project recently, I needed to grab some google search results for specific search phrases and then scrape the content from the page results. For example, when searching for a Sony 16-35mm f2.8 GM lens on google, I wanted to grab some content (reviews, text, etc) from the results. While this isn’t hard […]
Building and Documenting Python REST APIs With Flask and Connexion – Part 2
In Part 1 of this series, you used Flask and Connexion to create a REST API providing CRUD operations to a simple in-memory structure called PEOPLE. That worked to demonstrate how the Connexion module helps you build a nice REST API along with interactive documentation. As some noted in the comments for Part 1, the […]
Building and Documenting Python REST APIs With Flask and Connexion
If you’re writing a web application, then you’re probably thinking about making HTTP calls to your server to get data to populate the dynamic parts of your application. The goal of this article is to show you how to use Python 3, Flask, and Connexion to build useful REST APIs that can include input and […]
Practical Introduction to Web Scraping in Python
Web Scraping Basics What is web scraping all about? Consider the following scenario: Imagine that one day, out of the blue, you find yourself thinking “Gee, I wonder who the five most popular mathematicians are?” You do a bit of thinking, and you get the idea to use Wikipedia’s XTools to measure the popularity of […]
Building a Simple Web App With Bottle, SQLAlchemy, and the Twitter API
Last October we challenged our PyBites’ audience to make a web app to better navigate the Daily Python Tip feed. In this article, I’ll share what I built and learned along the way. In this article you will learn: How to clone the project repo and set up the app. How to use the Twitter […]
Building a Simple Web App with Bottle, SQLAlchemy, and the Twitter API
This is a guest blog post by Bob Belderbos. Bob is a driven Pythonista working as a software developer at Oracle. He is also co-founder of PyBites, a Python blog featuring code challenges, articles, and news. Bob is passionate about automation, data, web development, code quality, and mentoring other developers. Last October we challenged our […]
Code Evaluation with AWS Lambda and API Gateway
This tutorial details how AWS Lambda and API Gateway can be used to develop a simple code evaluation API, where an end user submits code, via an AJAX form submission, which is then executed securely by a Lambda function. Check out the live demo of what you’ll be building in action here. WARNING: The code […]
Code Evaluation With AWS Lambda and API Gateway
This tutorial details how AWS Lambda and API Gateway can be used to develop a simple code evaluation API, where an end user submits code, via an AJAX form submission, which is then executed securely by a Lambda function. Check out the live demo of what you’ll be building in action here. WARNING: The code […]
Web Scraping with Python and BeautifulSoup
To source data for data science projects, you’ll often rely on SQL and NoSQL databases, APIs, or ready-made CSV data sets. The problem is that you can’t always find a data set on your topic, databases are not kept current and APIs are either expensive or have usage limits. If the data you’re looking for […]
Test Driven Development of a Django RESTful API
This post walks through the process of developing a CRUD-based RESTful API with Django and Django REST Framework, which is used for rapidly building RESTful APIs based on Django models. NOTE: Check out the third Real Python course for a more in-depth tutorial on Django REST Framework. This application uses: Python v3.6.0 Django v1.11.0 Django […]
Isochrones using the Google Maps Distance Matrix API
by Drew Fustin | March 9, 2017 About Drew: Drew is the Lead Data Scientist at SpotHero, an on-demand solution to help drivers find their perfect parking spot, reserved ahead of time often at rates much lower than you’d find if you just drove up to the garage. He’s also worked at Digital H2O and […]
A Unified TLS API for Python
I have just proposed PEP 543: A Unified TLS API for Python to the python-dev mailing list for discussion. While the bulk of the technical correspondence will happen on that mailing list, I wanted to briefly write a long-form, less formal discussion of why this PEP is important and the problems I’m trying to address. […]
Scraping Financial Data with Selenium
Note: The following post is a significant step up in difficulty from the previous selenium-based post, Automate Your Browser: A Guided Selenium Adventure. Please see the start of that post for links on getting selenium set up if this is your first time using it. If you really do need financial data, there are likely […]
Building a Rest API with the Bottle Framework
REST APIs have become a common way to establish an interface between web back-ends and front-ends, and between different web services. The simplicity of this kind of interface, and the ubiquitous support of the HTTP and HTTPS protocols across different networks and frameworks, makes it an easy choice when considering interoperability issues. Bottle is a […]