Skip to main content

Expose Escrow AI workflows to CICD pipelines

Project description

Copyright 2024 BeeKeeperAI(R)

EscrowAI Github SDK

The github sdk is a cli tool that enables algorithm upload on escrow ai from github workflows

installation

The sdk is available as a Pypi package and can be installed using

pip install EscrowAICI

Prerequisites and dependencies

To use the sdk, generate a private public key pair using openssl

# generate a private key with the correct length
openssl genrsa -out private-key.pem 3072

# generate corresponding public key
openssl rsa -in private-key.pem -pubout -out public-key.pem

setup your github repository secrets settings using

  • BEEKEEPER_PROJECT_ID
  • BEEKEEPER_ORGANIZATION_ID
  • PROJECT_PRIVATE_KEY: Private key generated in earlier step
  • CONTENT_ENCRYPTION_KEY

Usage

Basic stucture

$ escrowai -h
usage: escrowai [-h] [--algorithm_type ALGORITHM_TYPE] [--key KEY] folder

Encrypt files and package them into a zip archive.

positional arguments:
  folder                The folder path containing the files to encrypt

optional arguments:
  -h, --help            show this help message and exit
  --algorithm_type ALGORITHM_TYPE
                        Algorithm type can be either validation or training
  --key KEY             The encryption key (base64 encoded)

arguments

Here is a sample github workflow showing how to use the sdk

name: Encrypt and Upload on Push

on:
  push:
    branches:
      - testing

jobs:
  encrypt_and_upload:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.x'

      - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install cryptography pyyaml azure-storage-blob auth0-python python-dateutil sseclient
          pip install EscrowAICI

      - name: Encrypt Files and Upload
        env:
          CONTENT_ENCRYPTION_KEY: ${{ secrets.SECRET_KEY_BASE64 }}
          AZURE_STORAGE_URL: ${{ secrets.AZURE_STORAGE_URL }}
          BEEKEEPER_PROJECT_ID: ${{ secrets.BEEKEEPER_PROJECT_ID }}
          BEEKEEPER_ORGANIZATION_ID: ${{ secrets.BEEKEEPER_ORGANIZATION_ID }}
          PROJECT_PRIVATE_KEY: ${{ secrets.PROJECT_PRIVATE_KEY }}
        run: |
          repo_name="${GITHUB_REPOSITORY##*/}"
          folder_path="files/$repo_name"
          zip_file="files/${repo_name}.zip"
          mkdir -p $folder_path
          # Assuming you need to copy or prepare files in this directory
          rsync -av --exclude='.git' --exclude='files' . ${folder_path}
          
          escrowai ${folder_path}

      - name: Clean up
        run: |
          rm -rf files/

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

EscrowAICI-0.1.5-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file EscrowAICI-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: EscrowAICI-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for EscrowAICI-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 35934529512ca222a030126da2016f33c59d5e91b1cb5d1dcbb265c28430399c
MD5 8a11b66883aed856102c5c6d4bb9d402
BLAKE2b-256 121ca1fc456dcc349fe7c9c4e2bd59e7875591933dda78e278b4e6845ace3bbf

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