LeanCloud Python SDK
pip install leancloudor
easy_install leancloud
Maybe you need the sudo prefix depends on your OS environment.
Python 2.7.18 and Python 3.6+.
Install dependencies:
pip install Sphinx sphinx_rtd_themecd apidoc
make htmlConfigure the following environment variables:
- APP_ID
- APP_KEY
- MASTER_KEY
- USE_REGION
Make sure the following options are configured on the LeanCloud console:
- Data Storage > Settings > Include ACL with objects being queried: checked
- Push Notification > Push notification settings > Prevent clients from sending push notifications: unchecked
- Settings > Security > Service switches > Push notifications: enabled
- Settings > Security > Service switches > SMS: disabled
And there is a cloud function naming add which returns 3 for add(a=1, b=2) deployed on the LeanEngine production environment of the application.
For example:
AV.Cloud.define('add', async function (request) {
    return request.params["a"] + request.params["b"]
})Install dependencies:
pip install -e .'[test]'Run tests:
python -m noseRun a single test without swallowing print:
python -m nose -v --nocapture tests/test_engine.py:test_lean_engine_errorCurrently, flake8 (linter) and black (formatter) are used. But we are still exploring.
- Edit changelogandsetup.py(version).
- Generate API doc.
- Commit the changes above and send a pull request.
- The maintainer will review and merge the pull request, then create a new release at GitHub web UI.
- A new version of the package will be published to PyPI automatically (via GitHub Actions).
License: GNU LGPL.
Author: asaka (lan@leancloud.rocks)