Apprentice
Apprentice is a framework built for developing Google Actions via Dialogflow and Google Cloud (serverless) Functions.
Includes:
- plug-and-play feel to get going quickly
- basic Dialogflow API 2.0 response handling
- local setup for quick iteration
Installation
pip install apprentice
Quickstart
We recommend you read the full tutorial here.
A Google Action project will consist of two things:
- Dialogflow Intent
- A webhook to satisfy your users intent
To generate a "Hello World" webhook, run:
$ apprentice init
This will create a file structure:
src/
main.py
requirements.txt
Run a local server with
$ apprentice run
and expose to localhost port via an https tunnel. Then add the url to the fulfillment webhook in Dialogflow.
For a more indepth example please see the tutorial I wrote here.
Deployment
Note
gcloud cli must be installed and authorized for the following command
to work. If you wish to not have gcloud cli installed, you can copy the file contents via the gcloud
function dashboard.
$ apprentice -f hello_world -s hello_world_agent -e hello_world
This will generate the command to execute a gcloud function deploy via the cli.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Metadata
Release files for apprentice 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| apprentice-0.4.2.tar.gz | 17.7 kB | Without provenance | Details |
Release files / apprentice-0.4.2.tar.gz
| Download URL | apprentice-0.4.2.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
735471f06d45186b7f2e93d3f02cd0eae67b586eb5647ddd9b5df3547e2d5de7
|
|
BLAKE2b-256 checksum How to use checksums |
5b7db0ed1a2c945670ada605bd46e7af300c73ef70ae8d2ec8e006c5e062ab13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Security for apprentice 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.