Skip to main content

unofficial caprover api to deploy apps to caprover

Project description

Caprover API

https://img.shields.io/pypi/v/caprover_api.svg https://img.shields.io/travis/ak4zh/caprover_api.svg Documentation Status

unofficial caprover api to deploy apps to caprover

Features

  • create app

  • add custom domain

  • enable ssl

  • update app with port mappings, env variables, repo info etc

  • deploy one click apps

  • get list of all apps

  • get app by name

  • delete app

  • delete app and it’s volumes

  • stop app

  • scale app

Usage

To use Caprover API in a project:

from caprover_api import caprover_api

cap = caprover_api.CaproverAPI(
    dashboard_url="cap-dashboard-url",
    password="cap-dashboard-password"
)

One Click Apps

get app name from List of one-click-apps

automated deploy:

app_variables = {
    "$$cap_redis_password": "REDIS-PASSWORD-HERE"
}
cap.deploy_one_click_app(
    one_click_app_name='redis',
    namespace='new-app',
    app_variables=app_variables,
    automated=True
)

manual deploy (you will be asked to enter required variables during runtime):

cap.deploy_one_click_app(
    one_click_app_name='redis',
    namespace='new-app',
)

Custom Apps

create a new app:

cap.create_app(
    app_name="new-app",
    has_persistent_data=False
)

create and deploy redis app from docker hub:

cap.create_and_update_app(
    app_name="new-app-redis",
    has_persistent_data=False,
    image_name='redis:5',
    persistent_directories=['new-app-redis-data:/data', ]
)

History

0.1.24 (2024-12-16)

  • Fix & test update from novel kwargs (#12)

  • update method lets you set httpAuth (#11)

  • update() now handles persistent directories that use hostPath (#7)

  • gen_random_hex works across whole one-click-app YAML (#6)

  • Bugfix: update() should not change notExposeAsWebApp (#8)

  • Enable SSL on base domain (#9)

  • Allow optional override one-click repository path (#5)

0.1.0 (2021-06-11)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caprover_api-0.1.24.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

caprover_api-0.1.24-py2.py3-none-any.whl (11.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file caprover_api-0.1.24.tar.gz.

File metadata

  • Download URL: caprover_api-0.1.24.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for caprover_api-0.1.24.tar.gz
Algorithm Hash digest
SHA256 a98eb88b0b00d2d50fd96d84b6ddf95959fc65368eefe05fef045b60750507c3
MD5 ee6a7f116763289857d79582f10d842a
BLAKE2b-256 36e48a9f1f39413a4b1f2b969d19c0b11400d78690d5accd2ad5ae1c161c4bf7

See more details on using hashes here.

File details

Details for the file caprover_api-0.1.24-py2.py3-none-any.whl.

File metadata

  • Download URL: caprover_api-0.1.24-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for caprover_api-0.1.24-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c0e215744c9511801bf28e555edb3d775babed2342599698f510f4493b530461
MD5 c1b9d6d41cdcb43a153e85f8f389b480
BLAKE2b-256 f9086006e8dc163b571fd1bbdac06cd129a3d6e9a2cfe6469d671e5818b40fa6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page