A fast & fun way to build portable cloud-native applications
Create a scheduled service which will run on a daily basis to create and share a Google Sheets document with another user.
Follow the steps in the installation guide
nitric new reports py-starter
pipenv install google-auth google-api-python-client
pipenv install --dev
- Login into Google Cloud and create a new project.
- Ensure the Google Sheets and Drive APIs are enabled for your project.
- Navigate to "IAM & Admin" > "Service Accounts". Click "Create Service Account", enter the account details, and confirm by clicking "Create".
- Inside the service account details, go to the "Keys" section. Select "Add Key" > "Create new key", choose "JSON", and click "Create" to download the credentials file.
- update our environment variables, create a file named
.env
and set the following values.
GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service-account-file.json
[email protected]
Use the Nitric Dashboard to trigger the task immediately, rather than waiting for the scheduled frequency.
nitric start
Nitric is a framework for rapid development of cloud-native and serverless applications. Define your apps in terms of the resources they need, then write the code for serverless function based APIs, event subscribers and scheduled jobs.
Apps built with Nitric can be deployed to AWS, Azure or Google Cloud all from the same code base so you can focus on your products, not your cloud provider.
Nitric makes it easy to:
- Create smart serverless functions and APIs
- Build reliable distributed apps that use events and/or queues
- Securely store and retrieve secrets
- Read and write files from buckets
The full documentation is available at nitric.io/docs.
We're completely open-source and encourage code contributions.
-
Ask questions in GitHub discussions
-
Find us on Twitter
-
Send us an email