earn the White PyBites Ninja earn the Yellow PyBites Ninja earn the Orange PyBites Ninja right arrow earn more PyBites Ninja belts and certificates
The best way to learn to code in Python is to actually use the language.

Our platform offers effective Test Driven Learning which will be key to your progress.


Join thousands of Pythonistas and start coding!


Join us on our PyBites Platform
Click here to code!

Building a Python Tips API with Django REST Framework and Deploying it to Digital Ocean

Posted by Bob on Tue 05 March 2019 in Django • Tagged with Django, APIs, Django REST Framework, tips, Digital Ocean, Django Commands, Postman, Nginx, postgres, Gunicorn, BeautifulSoup, requests, curl, SSH, Linux, deployment • 15 min read

In this article I will show you how to build a simple API for our growing collection of Python tips. First we make a simple Django app, defining the model. Next we use Django REST Framework to make an API supporting common CRUD operations. Then we will test it out using curl, Postman and Django REST's browser front-end. Lastly we deploy the API to Digital Ocean so we can start using it via our Slack with a Slash Command, which I will cover in the next article. Sounds exciting? You bet it is! Let's jump straight in!


Continue reading

Generating Beautiful Code Snippets with Carbon and Selenium

Posted by Bob on Tue 26 February 2019 in Tools • Tagged with Selenium, BeautifulSoup, requests, collections, random, urllib, carbon, tips, pprint, automation • 7 min read

Did you notice our Python tips lately? They looks more sexy, don't they? That's thanks to Carbon which lets you create beautiful images of your source code. As much as I love its interface though, what if we can automate this process generating the image for us? That's what we did and posting new tips to Twitter is now a breeze. In this article I will show you how using a bit of BeautifulSoup and selenium. Enjoy!


Continue reading

How to Parse Hidden HTML With Selenium Headless Mode and Deploy it to Heroku

Posted by Bob on Tue 19 February 2019 in Tools • Tagged with Selenium, headless, Heroku, tweepy, argparse, Slack, Packt, books, automation, parsing, BeautifulSoup, requests, namedtuple, Scheduler, git, buildpacks, environment variables • 6 min read

Ever wondered how you scrape hidden (or JS generated) HTML? Selenium is your friend. Ever wondered how to run it without a browser popping up? Use headless mode. How would you run it remotely? Use Heroku. And how about autoposting to Slack and Twitter? With the right libraries and API setup little code is needed. In this 10 step guide I will show you how to build a Packt Free Learning Notifier which will accomplish all these tasks. Ready to learn some nice automation skills in Python?


Continue reading

Code Challenge 58 - Analyze Podcast Transcripts with NLTK - Part I - Review

Posted by PyBites on Mon 07 January 2019 in Challenges • Tagged with code challenge, challenges, NLTK, podcast, text parsing, data mining, data science, talk python, itertools, sqlite3, dictionary comprehensions, list comprehensions, splitlines, iterators, SequenceMatcher, OrderedDict, praw, collections, defaultdict, namedtuple, Counter, JSON, XML, pomodoro, Flask, regex, datetime, timedelta, CLI applications, f-strings, feedparser, requests • 5 min read

In this article we review our PCC58 - Analyze Podcast Transcripts with NLTK - Part I code challenge.


Continue reading

Automating PyBites Review Post Using Github API and collections.defaultdict

Posted by Bob on Tue 13 November 2018 in Data • Tagged with collections, defaultdict, re, regular expressions, requests, challenges, review post, parsing, string manipulation, github, API • 4 min read

In this post I share a quick script I produced last week to automate a portion of our review post. There are some nice idioms that you might find useful.


Continue reading

Data Analysis of Pybites Community Branch Activity

Posted by Martin Uribe on Thu 18 October 2018 in Data • Tagged with data analysis, community, matplotlib, seaborn, dateutil, pathlib, collections, json, code challenges, numpy, pandas, requests • 15 min read

I wanted to play around with a dataset and see what I could find out about it. I decided on analyzing the little bit of data that I could collect from Github without having to use an OAuth key, which limits it to just 300 events. If you want to follow along with my notebook check out the instructions here. This notebook was my submission for Code Challenge 47 - PyBites First Year in Data (Special).


Continue reading

Fully Automate Login and Banner Generation with Selenium, Requests and Click

Posted by Bob on Sun 20 August 2017 in Modules • Tagged with Selenium, Requests, selenium-requests, Click, Pillow, automation, scraping, tools, PyBites Banner Generator, images • 3 min read

In part 3 of the PyBites Banner Generator article series I show you how to automatically generate a banner with Requests and Selenium.


Continue reading

Code Challenge 25 - Notification Service of Now Playing and Upcoming Movies - Review

Posted by PyBites on Mon 03 July 2017 in Challenges • Tagged with codechallenges, movies, series, digest, email, themoviedb, apis, argparse, requests, mailgun • 2 min read

In this article we review last week's Notification Service of Now Playing and Upcoming Movies code challenge.


Continue reading

Using Python Requests on a Page Behind a Login

Posted by Julian on Fri 09 June 2017 in Modules • Tagged with requests, code, web scraping, python • 4 min read

In this post I discuss using the requests module on web pages behind a login


Continue reading

Learning Python by Building a Wisdom Quotes App

Posted by Dante Septem on Tue 09 May 2017 in Learning • Tagged with challenges, learning, guest, wikipedia, API, code review, flask, requests, quotes, forismatic • 2 min read

In this guest post Dante tells us about his Wisdom of the Ages app he built for PyBites code challenge 16 (reviewed here). The best way to learn Python is to build something and we are proud of our community achieving just that.


Continue reading