Skip to main content

A Python library for the Demisto SDK

Project description

PyPI version CircleCI Language grade: Python Coverage Status

Demisto SDK

The Demisto SDK library can be used to manage your Demisto content with ease and efficiency. The library uses python 3.7+.

Usage

Installation

  1. Install - pip3 install demisto-sdk

  2. Upgrade - pip3 install --upgrade demisto-sdk

  3. Demisto server demisto-sdk integration - In order that demisto-sdk and Demisto server communicate, perfrom the following steps:

    1. Get an API key for Demisto-server - Settings -> Integrations -> API keys -> Get your Key (copy it, you will be to copy it once)
    2. Add the following parameters to ~/.zshrc and ~/.bash_profile:
    export DEMISTO_BASE_URL=<http or https>://<demisto-server url or ip>:<port>
    export DEMISTO_API_KEY=<API key>
    

    for example:

    export DEMISTO_BASE_URL=http://127.0.0.1:8080
    export DEMISTO_API_KEY=XXXXXXXXXXXXXXXXXXXXXX
    
    1. Reload your terminal before continue.

CLI usage

You can use the SDK in the CLI as follows:

demisto-sdk <command> <args>

For more information, run demisto-sdk -h. For more information on a specific command execute demisto-sdk <command> -h.


Commands

Supported commands:

  1. init
  2. Validate
  3. Lint
  4. Secrets
  5. Unify
  6. Split-yml
  7. Format
  8. Run
  9. Run-playbook
  10. Upload
  11. Download
  12. Generate-docs
  13. Generate-test-playbook
  14. Json-to-outputs
  15. Update-release-notes
  16. openapi-codegen

How to setup development environment?

Follow the guide found here to setup your demisto-sdk-dev virtual environment. The development environment is connected to the branch you are currently using in the SDK repository.

Simply activate it by running workon demisto-sdk-dev. The virtual environment can be deactivated at all times by running deactivate.


Autocomplete

Our CLI supports autocomplete for Linux/MacOS machines, you can turn this feature on by running one of the following: for zsh users run in the terminal

eval "$(_DEMISTO_SDK_COMPLETE=source_zsh demisto-sdk)"

for regular bashrc users run in the terminal

eval "$(_DEMISTO_SDK_COMPLETE=source demisto-sdk)"

License

MIT - See LICENSE for more information.


Contributions

Contributions are welcome and appreciated.
For information regarding contributing, press here. For release guide, press here

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

demisto-sdk-1.2.11.tar.gz (1.7 MB view details)

Uploaded Source

File details

Details for the file demisto-sdk-1.2.11.tar.gz.

File metadata

  • Download URL: demisto-sdk-1.2.11.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.54.0 CPython/3.8.3

File hashes

Hashes for demisto-sdk-1.2.11.tar.gz
Algorithm Hash digest
SHA256 ea2b34a723cf8b438acd6ba1d54a7b14cd4b111dcaed71305675dcb782bfe5cb
MD5 bd8e073844e8aee7966fe797c65868fc
BLAKE2b-256 c537575bdc81de94da5c051a97089e3c7ad5d148f57fcd5c56505345beb6d26b

See more details on using hashes here.

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