A client for DeepCode API (code analysis made by AI)
DeepCode's command line interface.
Minimal supported python version is: 3.6.5
Installation of published package from PyPI
pip install deepcode
poetry add deepcode
For detailed information see deepcode project on PYPI
Installation of package locally and development mode
For detailed information see development docs
- login: this will open a browser window to log into DeepCode.
- create/update configuration: this will walk you through some configuration steps in case you do not want to connect to
https://www.deepcode.ai but to some other host running a DeepCode instance.
- analyze: do analysis for a specific version of code. This will show all suggestions that are present in the code.
Usage: deepcode analyze [OPTIONS] Analyzes your code using Deepcode AI engine. Exit codes: 0 - not issues found 1 - some issues found 2 - Execution was interrupted by the user 3 - Some error happened while executing Options: Source location: [mutually_exclusive, required] The configuration of repository location -p, --path DIRECTORY Path to folder to be processed. Multiple paths are allowed -r, --git-uri REMOTE Git URI (e.g. git@<platform>:<owner>/<repo>.git@<oid> or https://<platform>/<owner>/<repo>.git@<oid>) -l, --with-linters Enable linters -log, --log-file FILE Forward all debugging messages to a file -txt, --result-text Present results in txt format -sev, --severity [info|warning|critical] Minimum severity level (default: info) --help Show this message and exit.
deepcode analyze --path (<folder path one>) --path (<folder path two>) --with-linters --log-file=~/.deepcode.log -txt --severity warning deepcode analyze --path (<folder path one>) deepcode analyze --git-uri email@example.com:DefinitelyTyped/DefinitelyTyped.git --with-linters
AnalysisResults in json format as described here
Python native usage
DeepCode CLI can be also used as a module and can be imported into another python code with python import system.
To use both functions, make sure, you set an environment variable 'DEEPCODE_API_KEY' with your API KEY, that can be obtained here
To use self-managed instance of Deepcode, set an environment variable 'DEEPCODE_SERVICE_URL' with its user (e.g. https://example.org)
:param [paths] - Paths should be a list of absolute paths to bundle dir :param [linters_enabled] - optional. requests also linter analysis :return - dictionary with results e.g. as described [here](https://www.deepcode.ai/docs/REST%20APIs%2FBundles) plus: 'id' for bundle id and 'url' for online view of analysis results example: import deepcode deepcode.analyze_folders('<path to files dir>')
analyze_git(platform, owner, repo, oid=None, linters_enabled=False):
:param [platform] - github.com, bitbucket.org, gitlab.com. :param [owner] - repository account. (e.g. facebook) :param [repo] - repository. (e.g. react) :param [linters_enabled] - optional. requests also linter analysis :return - dictionary with results e.g. as described [here](https://www.deepcode.ai/docs/REST%20APIs%2FBundles) plus: 'id' for bundle id and 'url' for online view of analysis results example: import deepcode deepcode.analyze_git('github.com', 'facebook', 'react')
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size deepcode-1.0.18-py3-none-any.whl (17.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size deepcode-1.0.18.tar.gz (16.3 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for deepcode-1.0.18-py3-none-any.whl