A utility library mapped to ComboCurve's API.
Install from Python package repository:
python -m pip install combocurve-api-helperor install directly from GitHub:
python -m pip install git+https://github.com/petbox-dev/combocurve-api-helper.git@mainTwo files are required in ~/.combocurve:
cc-api.config.jsoncombocurve.json
These are given by ComboCurve when configuring API access. Example files are provided
in ./config-examples/ to demonstrate the expected file structures.
cc-api.config.example.json:
{
"apikey": "<apikey>"
}combocurve.example.json:
{
"type": "service_account",
"project_id": "beta-combocurve",
"private_key_id": "<private_key_id>",
"private_key": "<private_key>",
"client_email": "<client_email>",
"client_id": "<client_id>",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "<client_x509_cert_url>"
}
-
Fork the repository:
- On this GitHub page, click "Fork" to create a copy under your own account.
-
CLone the forked repo onto on your machine:
git clone https://github.com/<your-username>/combocurve-api-helper.git cd combocurve-api-helper
-
Set the upstream remote:
- This allows you to fetch updates from the original repository:
git remote add upstream https://github.com/petbox-dev/combocurve-api-helper.git
-
Create a new branch:
- Always create a new branch for your feature or fix
- A common convention is to name the branch your GitHub username, a forward slash, and a brief description of the work you're doing
git checkout -b <your-username>/<your-branch-name>
-
Make your changes, and commit:
- After adding your files, or making edits, ensure typechecking succeeds, then commit your changes
mypy --package combocurve_api_helper git add . git commit -m "<description of changes>"
-
Push to your fork:
git push origin <the-name-of-your-branch>
-
Create a pull request:
- Go to "Pull Requests" tab in this repo, and click "compare across forks"
- Choose your branch as the source and keep the default
mainbranch as the target- ie:
petbox-dev/combocurve-api-helper(main)<-your-username/combocurve-api-helper(your-branch-name)
- ie:
- Fill the title and description with a summary of the proposed changes
- Request a review from
@dsfulf
The Example response: / Example data: blocks in method docstrings are
generated from the ComboCurve Postman collection — do not edit them by hand.
The collection's <type> placeholders (<string>, <number>, <boolean>, …)
are filled with realistic, deterministic spoof values (numbers as numbers, bools
as bools, ISO dates, ObjectId-like ids), so a docstring shows the response's
key/value shape without a live API call. Refresh after the API changes:
python scripts/generate_docstrings.py # rewrite in place
python scripts/generate_docstrings.py --check # verify; exit 1 if stale, 2 if unreachableEach method is matched to its operation by the docs.api.combocurve.com/api/<slug>
link in its docstring, where <slug> is the collection item name. (The OpenAPI
spec at storage.googleapis.com/beta-combocurve-api-docs/openapi-spec.yaml has
real example values, but is an older/less-complete snapshot — missing ~52
operations as of 2026-07 — so the collection is used instead.)
- David Fulford
MIT License
Copyright (c) 2023 Petroleum Engineering Toolbox
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.