Skip to main content

ci-cd-APIer -- Flask-like API framework for GitLab CI/CD pipelines

Project description

ci-cd-APIer

APIer is a library that allows you to launch its backend code with Flask-like syntax using GitLab CI/CD. All the requests and responses are processed with e2e encryption using age, so nobody has access to the data except the sender (web page) and the receiver (GitLab job in memory).

Usage example

To see the full example, take a look at the example repository.

Whenever the client calls a backend via APIer script, e.g.:

const APIer = new APIer(
    '$AGE_PUBLIC_KEY$',
    '$GITLAB_PIPELINE_ENDPOINT$',
    '$GITLAB_TOKEN$'
);

const totalSum = await APIer.sendRequest('sumNumbers', [1, 2, 3, 4, 5]);

A pipeline is triggered. Example code that handles the request in the pipeline may be:

app = APIER(environ["AGE_SECRET_KEY"])

@app.route("echo")
def endpoint_echo(data: any) -> str:
    return f"You said: {data}. Enjoy :)"
    
@app.route("sumNumbers")
def endpoint_sum(data: list[int]) -> str:
    return str(sum(data))

app.process_requests()

There also exists Python client for APIer in ci_cd_apier.client package.

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

ci_cd_apier-1.2.1.tar.gz (749.1 kB view details)

Uploaded Source

Built Distribution

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

ci_cd_apier-1.2.1-py3-none-any.whl (758.7 kB view details)

Uploaded Python 3

File details

Details for the file ci_cd_apier-1.2.1.tar.gz.

File metadata

  • Download URL: ci_cd_apier-1.2.1.tar.gz
  • Upload date:
  • Size: 749.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ci_cd_apier-1.2.1.tar.gz
Algorithm Hash digest
SHA256 e511cd266617e04a1f65cd2046633f4d166157660b645d694662fc6ef5570ec9
MD5 c9595d16758ce229c2d44ef2e3e4f024
BLAKE2b-256 6c2bb32f0802edb993c553ed12f3562f4b448ac783b3929fda32b1a2a6d684ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for ci_cd_apier-1.2.1.tar.gz:

Publisher: pypi-deploy.yml on esoadamo/ci-cd-apier

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ci_cd_apier-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: ci_cd_apier-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 758.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ci_cd_apier-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 258f51c2994bffeb077801ba23899fcef81e5e9de2026ef1f4a032a9cfb25526
MD5 9066f0c17119daf49cec7faa8c0e4995
BLAKE2b-256 c7c2b801eb02be6cf86c076071764a07c520ac7d5cb823d8d277e8f409748314

See more details on using hashes here.

Provenance

The following attestation bundles were made for ci_cd_apier-1.2.1-py3-none-any.whl:

Publisher: pypi-deploy.yml on esoadamo/ci-cd-apier

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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