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

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-0.9.9.tar.gz (4.8 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-0.9.9-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ci_cd_apier-0.9.9.tar.gz
Algorithm Hash digest
SHA256 ae082af67a8252f3b7131b530e4a76d4eda250d95f2991f7c2c6edf03c60bdb9
MD5 9f8c765c55631751fa661f55ca74b47c
BLAKE2b-256 4d7046c90eff9fe6a20c31c96bd7d46e1b1346f251ff7900afc04182751c8afc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ci_cd_apier-0.9.9.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-0.9.9-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ci_cd_apier-0.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 01943aaeb13dac5b4bbf53adff635202b88ff27ad5dd96330eb799e3539941de
MD5 b3fea944322359bb32ccc9beb92e832e
BLAKE2b-256 057b0b9b5dab9d44caf41f8fbf4f7b273606c48b039dadd870df0ca307b26a63

See more details on using hashes here.

Provenance

The following attestation bundles were made for ci_cd_apier-0.9.9-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