Pingo provides a uniform API to program devices like the Raspberry Pi, BeagleBone Black, pcDuino etc.

Related tags

Authenticationpingo
Overview

Pingo means "pin, go!"

Travis CI badge Coveralls badge

Pingo provides a uniform API to program devices like the Raspberry Pi, BeagleBone Black, pcDuino etc. just like the Python DBAPI provides an uniform API for database programming in Python.

The API is object-oriented but easy to use: a board is an instance of a Board subclass. Every board has a dictionary called pins which lists all GPIO pins on the board. Each pin is an instance of a Pin subclass with attributes that you can inspect to learn about its capabilities.

The name Pingo is a tribute to Garoa Hacker Clube, where the project started (the words pingo and garoa are related in Portuguese). To our English-speaking friends we like to say that it means "pin, go!" -- the main purpose of this package.

Media

Watch it on Youtube: https://www.youtube.com/watch?v=pAOooxPL_tQ

Intel IoT RoadShow São Paulo 2014

Intel IoT RoadShow São Paulo 2014

Basic usage

To use pingo, the first step is to instantiate a Board. Each Pingo driver is a concrete board subclass, for example, pingo.rpi.RaspberryPi and pingo.arduino.ArduinoFirmata are two such classes.

Pingo can automatically detect the board in most common cases. If the script is running on a supported board, pingo.detect.MyBoard() returns an suitable board instance. If Pingo is running on an unsupported machine (eg. a notebook), it will try to find a connected Arduino using the Firmata protocol via USB and -- if successful -- will return a pingo.arduino.ArduinoFirmata instance.

Once you have a board instance, it's possible to access its pins through the board.pins dictionary:

import pingo
from time import sleep

board = pingo.detect.MyBoard()
led_pin = board.pins[13]
led_pin.mode = pingo.OUT

while True:
    led_pin.hi()
    sleep(1)
    led_pin.lo()
    sleep(1)

Drivers

pingo.pcduini.PcDuino pingo.galileo.Galileo2 are examples of drivers, and the respective PcDuino and Galileo2 are subclasses of the pingo.board.Board abstract class that defines the common API for all boards.

The following table lists the drivers currently planned or under development.

Board Type Module/Package Status Notes
Arduino Firmata remote arduino.firmata level 1 requires firmata protocol on any Arduino board
Arduino Yún on-board arduino.yun level 2 requires Bridge sketch on the Arduino Yún
BeagleBone Black on-board bbb experim.  
Intel Galileo Gen 2 on-board galileo level 2 requires Intel IoT Dev Kit mraa library
LinkSprite pcDuino on-board pcduino level 1  
RaspberryPi on-board rpi level 0 requires RPi.GPIO on the Raspberry Pi
SECO UDOO on-board udoo level 0  

We are also interested in supporting: Banana Pi, Cubietech Cubieboard, SolidRun HummingBoard, TI MSP430 (via firmata protocol ).

In a addition, Pingo implements ghost, a mock software-only board for testing the API.

Types of drivers

on-board
Pingo and user code run on the board itself, using the Python interpreter installed in it.
remote
Pingo and user code run on host computer connected to board, controlling the board remotely. Useful for boards that are unable to run Python, like the Arduino UNO.
fake
Pingo and user code run on host computer emulating a dummy board in software. Useful for testing base classes from board.py and for teaching and demonstration.

Status of drivers

level 0
Digital I/O: get/set high/low status of digital pins (no PWM support).
level 1
Analog input: read values from analog pins.
level 2
PWM output: set variable value for digital pins with PWM capability.
experiments
Some Python experiments have been done with the board. See the experiments/ directory for code that may be helpful to start a new driver for a board.
none
Nothing has been done. Great opportunity for you to contribute with experiments and/or start a new driver.
Library - Recent and favorite documents

Thingy Thingy is used to quickly access recent and favorite documents. It's an XApp so it can work in any distribution and many desktop environments (

Linux Mint 23 Sep 11, 2022
JSON Web Token implementation in Python

PyJWT A Python implementation of RFC 7519. Original implementation was written by @progrium. Sponsor If you want to quickly add secure token-based aut

José Padilla 4.5k Jan 09, 2023
Provide OAuth2 access to your app

django-oml Welcome to the documentation for django-oml! OML means Object Moderation Layer, the idea is to have a mixin model that allows you to modera

Caffeinehit 334 Jul 27, 2022
examify-io is an online examination system that offers automatic grading , exam statistics , proctoring and programming tests , multiple user roles

examify-io is an online examination system that offers automatic grading , exam statistics , proctoring and programming tests , multiple user roles ( Examiner , Supervisor , Student )

Ameer Nasser 4 Oct 28, 2021
it's a Django application to register and authenticate users using phone number.

django-phone-auth It's a Django application to register and authenticate users using phone number. CustomUser model created using AbstractUser class.

MsudD 4 Nov 29, 2022
Flask Implementation of a login page and some basic functionality.

login_page Flask Implementation of a login page and some basic functionality. How to Run $ chmod +x run.sh setup.sh $ # run setup.sh only if the datab

3 Jun 03, 2021
Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.

Welcome to django-allauth! Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (soc

Raymond Penners 7.7k Jan 01, 2023
A simple model based API maker written in Python and based on Django and Django REST Framework

Fast DRF Fast DRF is a small library for making API faster with Django and Django REST Framework. It's easy and configurable. Full Documentation here

Mohammad Ashraful Islam 18 Oct 05, 2022
Local server that gives you your OAuth 2.0 tokens needed to interact with the Conta Azul's API

What's this? This is a django project meant to be run locally that gives you your OAuth 2.0 tokens needed to interact with Conta Azul's API Prerequisi

Fábio David Freitas 3 Apr 13, 2022
Google Auth Python Library

Google Auth Python Library This library simplifies using Google's various server-to-server authentication mechanisms to access Google APIs. Installing

Google APIs 598 Jan 07, 2023
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 Single- and multi-tenant support.

Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 Single- and multi-tenant support.

Intility 220 Jan 05, 2023
Ready-to-use and customizable users management for FastAPI

FastAPI Users Ready-to-use and customizable users management for FastAPI Documentation: https://frankie567.github.io/fastapi-users/ Source Code: https

François Voron 2.4k Jan 04, 2023
Awesome Django authorization, without the database

rules rules is a tiny but powerful app providing object-level permissions to Django, without requiring a database. At its core, it is a generic framew

1.6k Dec 30, 2022
A module making it easier to manage Discord oAuth with Quart

quart_discord A module making it easier to manage Discord oAuth with Quart Install pip install git+https://github.com/xelA/ 5 Oct 27, 2022

A secure authentication module to validate user credentials in a Streamlit application.

Streamlit-Authenticator A secure authentication module to validate user credentials in a Streamlit application. Installation Streamlit-Authenticator i

M Khorasani 336 Dec 31, 2022
This project is an open-source project which I made due to sharing my experience around the Python programming language.

django-tutorial This project is an open-source project which I made due to sharing my experience around the Django framework. What is Django? Django i

MohammadMasoumi 6 May 12, 2022
Extending the Django authentication system with a phone verification step.

Extending the Django authentication system with a phone verification step.

Miguel Grinberg 50 Dec 04, 2022
Django Authetication with Twitch.

Django Twitch Auth Dependencies Install requests if not installed pip install requests Installation Install using pip pip install django_twitch_auth A

Leandro Lopes Bueno 1 Jan 02, 2022
CheckList-Api - Created with django rest framework and JWT(Json Web Tokens for Authentication)

CheckList Api created with django rest framework and JWT(Json Web Tokens for Aut

shantanu nimkar 1 Jan 24, 2022
Minimal authorization through OO design and pure Ruby classes

Pundit Pundit provides a set of helpers which guide you in leveraging regular Ruby classes and object oriented design patterns to build a simple, robu

Varvet 7.8k Jan 02, 2023