New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ci-cd-apier

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ci-cd-apier

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

1.2.0
PyPI
Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts