Flask-GCM is a simple wrapper for the python-gcm library to be used with Flask applications.
Project description
Flask-GCM
Flask-GCM is a simple wrapper for the `gcm-client <https://pypi.python.org/pypi/gcm-client/>`__ library to be used with Flask applications.
Getting Started
Requirements
Python 2.6+ or Python 3.3+
Installation
Flask-GCM can be installed with pip:
$ pip install flask-gcm
or directly from the source code:
$ git clone https://github.com/MichiganLabs/flask-gcm.git $ cd flask-gcm $ python setup.py install
Basic Usage
from flask import Flask
from flask.ext.gcm import GCM
app = Flask(__name__)
gcm = GCM(app)
Flask-GCM also supports the Flask “app factory” paradigm using init_app:
from flask import Flask
from flask.ext.gcm import GCM
gcm = GCM()
def create_app():
app = Flask(__name__)
gcm.init_app(app)
return app
The gcm object can then be used as described in the `gcm-client docs <http://gcm-client.readthedocs.org/en/latest/index.html>`__
For Contributors
Requirements
GNU Make:
Windows: http://cygwin.com/install.html
Linux: http://www.gnu.org/software/make (likely already installed)
virtualenv: https://pypi.python.org/pypi/virtualenv#installation
Installation
Create a virtualenv:
$ make env
Run the tests:
$ make test
Build the documentation:
$ make doc
Run static analysis:
$ make flake8 $ make pep257 $ make check # includes all checks
Pull Request Guidelines
Contributions are always welcome! Please keep the following in mind when creating a pull request:
Include (passing) tests for all new features and bugfixes
Contributed code should pass flake8 checks
Include documentation which passes pep257 guidelines
Changelog
0.0.1 (2014/10/13)
Initial release
0.2.1 (2019/08/16)
Switch to Firebase URL which theoretically supports GCM
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-GCM-0.2.1.tar.gz
.
File metadata
- Download URL: Flask-GCM-0.2.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b5792d90d3ebdff5e4d570158d2bdf9746f3f6cca17d3f8dfddc74ffa70289d |
|
MD5 | 60e4ef5bac859c1603b02c90805ea9f0 |
|
BLAKE2b-256 | 915b8c763bd5245cb5030bf0d10cf11a52744c69c200ecb34ce8621dd178193c |
File details
Details for the file Flask_GCM-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: Flask_GCM-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e281d8e7f0f94953ac7267134c20bb2b644325963b2c048b0b623a9a9b0f6ed6 |
|
MD5 | a02ba4ba6c60215e437f8ca1ca071ddc |
|
BLAKE2b-256 | e34183bf2de7863f1d63fd31db7db12a49673a509131b0c348be0784f9668133 |