Skip to main content

Coolipy - (Un)oficial Coolify - coolify.io - Python client!

Reason this release was yanked:

broken build

Project description

Coolipy

The first unofficial Python client for the Coolify.
Coolipy simplifies programmatically interacting with Coolify by providing wrappers around Coolify API, enabling you to manage projects, deployments, servers, services, and more with python scripts.

Installation

Install Coolipy using pip:

pip install coolipy

Features

  • Manage Coolify projects, servers, and deployments.
  • Simplify service creation and environment management.
  • 1 dependency: requests.

TO DO:

  • Async support.

Quick Start Guide

  • Import and Initialize
from coolipy import Coolipy

coolify = Coolipy(
    coolify_api_key="your_coolify_api_key",
    coolify_endpoint="your_coolify_instance_address",
)

Example Usage

  • Get Project Information
coolify.projects.get(project_uuid="your_project_uuid")
  • Create a Service
service_data = ServiceModelCreate(
    type=COOLIFY_SERVICE_TYPES.glance,
    name="Example Service",
    project_uuid="your_project_uuid",
    server_uuid="your_server_uuid",
    destination_uuid="your_destination_uuid",
    instant_deploy=True,
    environment_name="production"
)
new_service = coolify.services.create(service_data)
  • List Servers
servers = coolify.servers.list()
  • Create a DB:
postgres_db = PostgreSQLModelCreate(
    project_uuid="your_project_uuid",
    server_uuid="your_server_uuid",
    environment_name="production",
    is_public=False,
    limits_cpu_shares=0,
    limits_cpus=0,
    limits_cpuset=0,
    limits_memory=0,
    limits_memory_reservation=0,
    limits_memory_swap=0,
    limits_memory_swappiness=0,
    instant_deploy=True,
    postgres_user="dbuser",
    postgres_password="password",
    postgres_db="mydatabase",
    name="My PostgreSQL DB",
    postgres_conf="LQ==",  # Example config
    postgres_host_auth_method="-",
    postgres_initdb_args="-"
)

coolify.databases.create(database_model_create=postgres_db)
  • Create an App
app_data = ApplicationPrivateGHModelCreate(
    project_uuid="your_project_uuid",
    server_uuid="your_server_uuid",
    environment_name="production",
    ports_exposes="8080",
    github_app_uuid="your_github_app_uuid",
    git_repository="your_github_repo",
    git_branch="main",
    build_pack=COOLIFY_BUILD_PACKS.dockerfile,
    instant_deploy=True,
    name="MyApp"
)

new_app = coolify.applications.create(app_data)

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

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

coolipy-0.0.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coolipy-0.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file coolipy-0.0.1.tar.gz.

File metadata

  • Download URL: coolipy-0.0.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for coolipy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e4136455666818b7725b54cfccdb4a52fa777642f06a25fc30e43c8192f8b423
MD5 663bd318d6fff70b37f9abc3ef6511a1
BLAKE2b-256 c8102511957f8a5976d266e3f6a792b2cc728563c456a00940699a093863d9ca

See more details on using hashes here.

File details

Details for the file coolipy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: coolipy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for coolipy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 daa866e9ab199afd2a84f6dcb3766f910ef334039cdb2dd72b519578bfc583a2
MD5 d2bb01983720a1a86ad7d1c591e5d8b8
BLAKE2b-256 15858e9a54c1507365b3e123a7e3decbfee4505004e442a717a19370245bfa92

See more details on using hashes here.

Supported by

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