Skip to content

CarlDownsOracle/oci-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCI API Examples

Python API

This example code will get you started with the OCI Python API.

API Clients In Use

  • Audit
  • Identity
  • Compute
  • Block Storage
  • Virtual Networking
  • Resource Search
  • Log Search
  • Monitoring / Put Custom Metrics
  • Usage

Prerequisites

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.

Virtual Environment

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

Start the Flask web server:

(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!

Access from local browser:

http://127.0.0.1:5000/

User Interface

User Interface

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published