Skip to main content

Abstra CLI

Reason this release was yanked:

Deprecated

Project description

pypi

[PyPI Downloads](

https://pypi.org/project/abstra-cli/)

Code check

abstra-cli

Install

Download from pip (preferably using pipx):

pip[x] install abstra-cli

Commands

Most commands are authenticated. To authenticate you need to generate an API Token here.

Authentication credentials are stored in the current directory at .abstra/credentials.

Alternatively you can set the ABSTRA_API_TOKEN environment variable.

Configure

abstra configure [API_TOKEN]

It configures the current working directory credentials. Credentials are stored at .abstra/credentials.

Ignoring files

You can ignore files placing a .abstraignore at the target directory:


__pycache__

tests/

*.ipynb

.abstraignore itself will always be ignored

Remote resources

The general structure of the commands follows the pattern below: usage: abstra <command> <resource> [<argument>...] [--<optional-argument-name> <optional-argument-value> ...]

The available commands are: list, add, update*, remove and play*. *note: update and play commands are currently only available to the forms resource . Remote resources can be forms, files, vars or packages.

You can manage remote resources with the following commands:

List resources

abstra list RESOURCE{forms, files, vars, packages}

List remote resources on your workspace.

Examples:

abstra list packages

abstra list vars

abstra list files



# Saving env vars and packages

abstra list packages > requirements.txt

abstra list vars > .env

Add resource

abstra add RESOURCE [...OPTIONS]

Adds remote resources on your workspace.

The current options for each resource are:

  • forms:
    1. --name: string
    2. --file: file_path
    3. --code: string
    4. --background: image_path or string
    5. --main-color: string
    6. --start-message: string
    7. --error-message: string
    8. --end-message: string
    9. --start-button-text: string
    10. --timeout-message: string
    11. --logo-url: string
    12. --show-sidebar: boolean
    13. --log-messages: boolean
    14. --font-color: string
    15. --auto-start: boolean
    16. --allow-restart: boolean
    17. --welcome-title: string
    18. --brand-name: string

*note: set either file or code, but not both.

  • files:

    1. file_path[]: list of file or directory paths
  • vars:

    1. environment_variable[]: list of Key=Value env vars
    2. -f or --file: file_path (ex. -f .env)
  • packages:

    1. package_name[]: list of packages with optional version (ex. numpy=1.0.1)
    2. -f or --file: file_path (ex. --file requirements.txt)

Examples:

# Files

abstra add files foo.txt bar.log

abstra add files foo/ ./



# Vars

abstra add vars ENVIROMENT=production VERSION=1.0.0

abstra add vars -f .env

abstra add vars --file .env



# Packages

abstra add packages pandas numpy=1.0.1 scipy>=1.0.1

abstra add packages -f requirements.txt

abstra add packages -r requirements.txt

abstra add packages --file requirements.txt

abstra add packages --requirement requirements.txt


# forms

abstra add form --name="my_form" -f main.py --background '#fffeee'

abstra add form --name="Form Name" --code "from hackerforms import * \n\ndisplay('hello_world')" --background '#fffeee' --main-color red --start-message 'start message' --error-message 'error-message' --end-message 'end message' --start-button-text 'start button text' --show-sidebar --allow-restart

Update form

abstra add RESOURCE [...OPTIONS]

Adds remote resources on your workspace.

The current options for each resource are:

  • forms:
    1. form_id: string (required parameter)
    2. --name: string
    3. --file: file_path
    4. --code: string
    5. --background: image_path or string
    6. --main-color: string
    7. --start-message: string
    8. --error-message: string
    9. --end-message: string
    10. --start-button-text: string
    11. --timeout-message: string
    12. --logo-url: string
    13. --show-sidebar: boolean
    14. --log-messages: boolean
    15. --font-color: string
    16. --auto-start: boolean
    17. --allow-restart: boolean
    18. --welcome-title: string
    19. --brand-name: string

*note: set either file or code, but not both.

Examples:

# Forms

abstra update form 7e549274-0e59-4b56-ad08-21bf48793be2 --name="Another name" --allow-restart

Remove resource

abstra remove RESOURCE [...OPTIONS]

Remove remote resources from your workspace.

Examples:

abstra remove files foo.txt bar.log

abstra remove vars ENVIROMENT VERSION

abstra remove packages pandas numpy scipy

abstra remove form 7e549274-0e59-4b56-ad08-21bf48793be2

Play resource

abstra play form 7e549274-0e59-4b56-ad08-21bf48793be2

Aliases

Some commands have aliases.

upload

# Alias for `abstra add files` with default argument `.`

abstra upload [FILES or DIRECTORIES, default: .]

ls

# Alias for `abstra list files`

abstra ls

rm

# Alias for `abstra remove files`

abstra rm

install

# Alias for `abstra add packages`

abstra install [PACKAGES]

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

abstra-cli-0.5.0.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

abstra_cli-0.5.0-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

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