This example code will get you started with the OCI Python API.
- Audit
- Identity
- Compute
- Block Storage
- Virtual Networking
- Resource Search
- Log Search
- Monitoring / Put Custom Metrics
- Usage
You will need an OCI tenancy. Check out the OCI Cloud Free Tier!
See the instructions for setting up API access to your tenancy.
This is a good article describing key OCI concepts.
You will need a OCI Compartment ID (aka, OCID) to run the app. Compartments provide the IAM security scope for all API calls.
Set up a proper virtual env, activate it, and install the requirements in your virtual env:
my-machine $ python3 -m venv venv
my-machine $ source venv/bin/activate
(venv) my-machine $ pip install -r requirements.txt
(venv) my-machine $ source start_server.sh
* Serving Flask app "app/views.py" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
http://127.0.0.1:5000/