Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d73a90
commit 45049bf
Showing
8 changed files
with
319 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
# axonius_api_client | ||
|
||
An API client for [Axonius](https://axonius.com). | ||
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/) | ||
[![Made With Python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) | ||
[![PyPi package](https://badge.fury.io/py/axonius-api-client.svg)](https://pypi.org/project/axonius-api-client/) | ||
[![GitHub Repository](https://badge.fury.io/gh/Axonius%2Faxonius_api_client.svg)](https://github.com/Axonius/axonius_api_client) | ||
[![Documentation Status](https://readthedocs.org/projects/axonius-api-client/badge/?version=latest)](https://axonius-api-client.readthedocs.io/en/latest/?badge=latest) | ||
[![Downloads](https://pepy.tech/badge/axonius-api-client)](https://pepy.tech/project/axonius-api-client) | ||
|
||
## Documentation | ||
axonius-api-client is an API client for [Axonius](https://axonius.com) that provides: | ||
|
||
**With the 2.0 release the docs are in the midst of an overhaul.** | ||
* A fully modeled python API library that makes using the Axonius REST API easy. | ||
* A powerful command line interface that exposes most of the functionality of the | ||
underlying python library. | ||
|
||
Current version of 2.0.1 has more docs with usage of the CLI. | ||
Resources: | ||
|
||
Found [here](https://axonius-api-client.readthedocs.io/en/latest/?) | ||
* [Documentation](https://axonius-api-client.readthedocs.io/) | ||
* [PyPi package listing](https://pypi.org/project/axonius-api-client/) | ||
* [GitHub repository](https://github.com/Axonius/axonius_api_client) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
.. include:: /main/.special.rst | ||
|
||
Contribution | ||
################################################### | ||
|
||
We welcome all contributions to `axonius-api-client`. | ||
|
||
Support | ||
=================================================== | ||
|
||
For any support requests, bug reports, or feature requests you can: | ||
|
||
* Open an issue in the `issue tracker`_ | ||
* Send an email apiclient@axonius.com | ||
|
||
Reporting Issues | ||
=================================================== | ||
|
||
When reporting issues, please include information for: | ||
|
||
- Python distribution and version | ||
- Operating System platform and version | ||
- `axonius-api-client` version | ||
- Full tracebacks of any exceptions | ||
|
||
Submitting Patches | ||
=================================================== | ||
|
||
All patches should be submitted as pull requests on the `GitHub project`_. | ||
|
||
- Clearly explain what you're trying to accomplish. | ||
|
||
- Include tests for any changes. | ||
|
||
- Ensure the full :ref:`testing-suite` runs without any errors before submitting | ||
a pull request. | ||
|
||
- Ensure the test coverage reports 100% before submitting a pull request. | ||
|
||
- Follow :pep:`8`. | ||
|
||
- Use `isort`_ and `black`_ to format your code and `flake8`_, `pydocstyle`_, | ||
and `bandit`_ to lint your code: | ||
|
||
.. code-block:: shell | ||
$ isort -rc -y axonius_api_client setup.py axonshell*.py | ||
$ black axonius_api_client setup.py axonshell*.py | ||
$ pydocstyle axonius_api_client setup.py axonshell*.py | ||
$ flake8 --max-line-length 89 axonius_api_client setup.py axonshell*.py | ||
$ bandit --skip B101 -r axonius_api_client | ||
.. _testing-suite: | ||
|
||
Testing Suite | ||
=================================================== | ||
|
||
`axonius-api-client` uses `pytest`_ as it's test suite. | ||
|
||
To run all tests, create a .env file with the connection information: | ||
|
||
.. code-block:: shell | ||
$ echo 'AX_URL=x' >> .env | ||
$ echo 'AX_KEY=x' >> .env | ||
$ echo 'AX_SECRET=x' >> .env | ||
Then run pytest to run the full test suite and generate test coverage in html format | ||
to `cov_html/index.html`: | ||
|
||
.. code-block:: shell | ||
$ pytest \ | ||
-ra \ | ||
--verbose \ | ||
--cov-config=.coveragerc \ | ||
--cov-report=html:cov_html \ | ||
--cov=axonius_api_client \ | ||
--showlocals \ | ||
--exitfirst \ | ||
axonius_api_client/tests | ||
Supported Python versions | ||
---------------------------------------------------------- | ||
|
||
* Latest versions of 3.7 and 2.7 | ||
* Windows, OSX, Linux | ||
|
||
Tested Python versions | ||
---------------------------------------------------------- | ||
|
||
* 3.7.4 and 2.7.16 on OSX | ||
* 3.7.4 and 2.7.16 on Windows | ||
|
||
.. note:: | ||
|
||
As Python 2.7 is nearing it's end-of-life on 01/01/2020, 2.7 is not part of the | ||
normal QA tests performed before releasing a new version. Please switch over to using | ||
Python 3.7 as soon as possible! | ||
|
||
.. _issue tracker: https://github.com/Axonius/axonius_api_client/issues | ||
.. _GitHub project: https://github.com/Axonius/axonius_api_client | ||
.. _black: https://github.com/psf/black | ||
.. _flake8: https://gitlab.com/pycqa/flake8 | ||
.. _pytest: https://docs.pytest.org/en/latest/ | ||
.. _isort: https://github.com/timothycrosley/isort | ||
.. _pydocstyle: https://github.com/PyCQA/pydocstyle/ | ||
.. _bandit: https://github.com/PyCQA/bandit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.