Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Email client for the Opwen project

Project Description

What’s this?

This repository contains the source code for the Opwen Lokole web-application.

The Lokole is a simple email client that has functionality like:

  1. Self-service creation of user accounts
  2. Read emails sent to the account
  3. Write emails including rich formatting
  4. Send attachments

All emails are stored in a local SQLite database. Once per day, the emails that were written during the past 24 hours get exported from the database, stored in a JSON file, compressed and uploaded to a location on Azure Blob Storage. The Opwen Server picks up these JSON files, manages the actual mailboxes for the users on the Lokole and sends new emails back to the Lokole by using the same compressed file exchange format.

The Lokole web-application is intended to run on low-spec Raspberry Pi 3 hardware. There is a script to set up the hardware with all the bits and pieces necessary to run the Lokole web-application: web server, wsgi server, etc.

Why is this useful?

Email is at the core of our modern life, letting us keep in touch with friends and family, connecting us to our businesses partners and fostering innovation through exchange of information.

However, in many parts of the developing world, email access is not very wide-spread, usually because bandwidth costs are prohibitively high compared to local purchasing power. For example, in the Democratic Republic of the Congo (DRC) only 3% of the population have access to emails which leaves 75 million people unconnected.

The Opwen Lokole is a project by the Canadian-Congolese NGO Ascoderu that aims to address this problem by tackling it from three perspectives:

  1. The Lokole is an email client that only uses bandwidth on a schedule. This reduces the cost of service as bandwidth can now be purchased when the cost is lowest. For example, in the DRC, $1 purchases only 65 MB of data during peak hours. At night, however, the same amount of money buys 1 GB of data.
  2. The Lokole uses an efficient data exchange format plus compression so that it uses minimal amounts of bandwidth, reducing the cost of service. All expensive operations (e.g. creating and sending of emails with headers, managing mailboxes, etc.) are performed on a server in a country where bandwidth is cheap.
  3. The Lokole only uses bandwidth in batches. This means that the cost of service can be spread over many people and higher savings from increased compression ratios can be achieved. For example, individually purchasing bandwidth for $1 to check emails is economically un-viable for most people in the DRC. However, the same $1 can buy enough bandwidth to provide email for hundreds of people via the Lokole. Spreading the cost in this way makes email access sustainable for local communities.

System overview & Data exchange format

Can be found in the opwen-cloudserver readme.

Development setup

First, get the source code.

git clone https://github.com/ascoderu/opwen-webapp.git
cd opwen-webapp

Second, install the system-level dependencies using your package manager, e.g. on Ubuntu:

sudo apt-get install -y python3-venv npm
sudo ln -s /usr/bin/nodejs /usr/bin/node

Third, use the makefile to verify your installation by running the tests and starting up the server. The makefile will automatically install all required dependencies into a virtual environment and set up some dummy environment variables for local development. The server will automatically reload whenever any of the Flask code or Jinja templates are changed.

make tests
make server

The routes of the app are defined in views.py so take a look there for an overview of the entrypoints into the code.

For local development, you can set the following additional environment variables:

OPWEN_ENABLE_DEBUG='True'
AZURE_ROOT='/tmp/azure'

With these environment variables set, when the Lokole exchanges data with the server, it will not make any calls to Azure and instead depend on the files in the AZURE_ROOT directory. Any files uploaded to the server will be written to a subdirectory of AZURE_ROOT so that they can be inspected. To test sending emails from the server to the Lokole, simply create a file at $AZURE_ROOT/to-lokole/emails.pack and the Lokole device will ingest the emails in that file during the data exchange.

Adding a new language

export LANG=ln
make prepare-translations
poedit "opwen_email_client/webapp/translations/$LANG/LC_MESSAGES/messages.po"
make compile-translations

Or via Transifex.

Release History

Release History

This version
History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
opwen_email_client-0.1.3.tar.gz (724.6 kB) Copy SHA256 Checksum SHA256 Source Sep 10, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting