Skip to content

rolsen/tinysubscriptions

Repository files navigation

TinySubscriptions

A simple, embeddable subscription list manager.

  • Allows end-users to subscribe / unsubscribe.
  • Maintains end-user subscriptions via an external subscription service (SendGrid).
  • Allows admin users to set which subscriptions are available to end-users.
  • Maintains subscription availability locally

Contact / development team

This is a project of Gleap LLC with copyright 2014.

License

GNU GPLv3

Technologies used

Local system setup

Ensure Python 2.7.* and PIP.

Local virtual environment setup

VirtualEnv is recommended, but not required. venv is in the .gitignore.

Install software $ pip install -r requirements.txt

Local development / testing

Run automated tests $ python run_tests.py

Start local server $ python tiny_subscriptions.py

Development guidelines / standards

Due to the potential for mutliple deployment and client-driven modification outside of Gleap (the original developer), this project values high test coverage and style adherence.

  • The project asks for 80% test coverage on server-side.
  • Server-side modules, classes, and functions should be documented using epydoc.
  • Server-side code should conform to Google's Python Style Guide.
  • The project uses plain old CSS but should have element, class, and finally ID-based rules in that order.
  • Client-side JS should follow Google's JavaScript Style Guide.
  • Client-side files, classes, and functions should be documented using JSDoc.
  • Client-side automated tests are optional but encouraged. For help with getting started on client-side testing, see Addy Osmani's tutorial.
  • All code checked in (via Gleap) to master or a version release branch should go through code review.
  • Code produced during pair programming or for initial project bootstrapping does not require code review. However, the results of pair programming should still go through a pull request.
  • Engineers can perform a code review for themselves if another engineer is not available within one working day.

Configuration Settings

The application configuration settings are maintained by Flask. The configuration values (held in flask_config.json) should include:

  • REDIS_HOST: The URI where the application redis instance can be accessed.
  • REDIS_PORT: The port where the application redis instance should be accessed.
  • REDIS_DB: The integer ID of the database to use.
  • REDIS_PASSWORD: The password to use to authenticate with the redis service.
  • REDIS_EXPIRATION: The number of seconds that data cached in the redis service should be saved there before being marked invalid.
  • FAKE_MONGO: Boolean indicating if a mongo database should be emulated.
  • BASE_URL: The URL where this module is running out of.
  • SENDGRID_API_USERNAME: The username to use to authenticate with the transactional email service.
  • SENDGRID_API_KEY: The API key (password) to use to authenticate with the transactional email service.
  • FAKE_SENDGRID: Boolean indicating if the sendgrid service should be emulated.
  • BASE_STATIC_URL: The root URL where the static content supporting this module can be found.

These configuration values we be loaded from the 'tinysubscriptions' attribute if that attribute is defined.

About

Simple subscription manager for end-users and admins.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published