Skip to content

Commit a623869

Browse files
authored
docs: Update README with installtion instructions (#157)
* docs: Update README with installtion instructions * fix: Correct scope operand for dashboards
1 parent e22f3b9 commit a623869

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
Sysdig Monitor/Secure Python client library
22
===
33

4-
[![Build Status](https://travis-ci.org/draios/python-sdc-client.png?branch=master)](https://travis-ci.org/draios/python-sdc-client)
4+
![CI - Master - Scheduled](https://github.com/sysdiglabs/sysdig-sdk-python/workflows/CI%20-%20Master%20-%20Scheduled/badge.svg)
55
[![Current version on PyPI](http://img.shields.io/pypi/v/sdcclient.svg)](https://pypi.python.org/pypi/sdcclient)
66

77
A Python client API for Sysdig Monitor/Sysdig Secure.
88

9-
This module is a wrapper around the Sysdig Monitor/Sysdig Secure APIs, which are documented [here](http://support.sysdigcloud.com/hc/en-us/articles/205233166-The-Sysdig-Cloud-API-Specification). It exposes most of the sysdig REST API functionality as an easy to use and easy to install Python interface. The repository includes a rich set of examples (in the [examples](examples/) subdir) that quickly address several use cases.
9+
This module is a wrapper around the Sysdig Monitor/Sysdig Secure APIs. It exposes most of the sysdig REST API functionality as an easy to use and easy to install Python interface. The repository includes a rich set of examples (in the [examples](examples/) subdir) that quickly address several use cases.
1010

1111
Installation
1212
------------
13-
#### Automatic w/ PyPI ([virtualenv](http://virtualenv.readthedocs.org/en/latest/) is recommended.)
13+
#### Automatic with PyPI
1414
pip install sdcclient
1515

16-
#### Manual
17-
git clone https://github.com/draios/python-sdc-client.git
18-
cd python-sdc-client
19-
python setup.py install
16+
#### Manual (development only)
2017

21-
#### One-step cmdline to create virtualenv, install client, and gain access to sample programs
18+
This method requires [Poetry](https://python-poetry.org/) installed
2219

23-
```
24-
$ virtualenv python-sdc-env && source python-sdc-env/bin/activate && pip install sdcclient && git clone https://github.com/draios/python-sdc-client && python python-sdc-client/examples/set_secure_system_falco_rules.py --help
25-
```
20+
git clone https://github.com/sysdiglabs/sysdig-sdk-python.git
21+
cd python-sdc-client
22+
poetry install
2623

2724
Quick start
2825
-----------
@@ -61,7 +58,9 @@ For an example on how to parse this output, take a look at a simple example like
6158

6259
Function List & Documentation
6360
-----------------------------
64-
For the list of available functions in the current `master` branch of this repo and corresponding docs, refer to the [Python Script Library documentation page](http://python-sdc-client.readthedocs.io/en/latest/). Equivalent docs for the functions in the most recent "stable" release (which is what you'd get via `pip` install, and corresponds to the most recent [release](https://github.com/draios/python-sdc-client/releases)) are located [here](http://python-sdc-client.readthedocs.io/en/stable/).
61+
**Work in progress**
62+
63+
Fully documented methods is in our roadmap and will be available soon.
6564

6665
On-Premises Installs
6766
--------------------

sdcclient/monitor/dashboard_converters/_dashboard_scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def convert_scope_string_to_expression(scope = None):
3232
| 'in'
3333
;
3434
35-
operand = /[[a-zA-Z0-9_-]\.]+/ ;
35+
operand = /[a-zA-Z0-9_\-\.]+/ ;
3636
3737
multiple_value
3838
=

specs/monitor/dashboard_converters/dashboard_scope_spec.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@
3737
"value": ["foo"]
3838
}]]))
3939

40+
with it('parses correctly: cluster.id-number = "foo"'):
41+
param = 'cluster.id-number = "foo"'
42+
res = convert_scope_string_to_expression(param)
43+
expect(res).to(equal([True, [{
44+
"displayName": "",
45+
"isVariable": False,
46+
"operand": "cluster.id-number",
47+
"operator": "equals",
48+
"value": ["foo"]
49+
}]]))
50+
4051
with it("parses correctly: agent.id = 'foo'"):
4152
param = "agent.id = 'foo'"
4253
res = convert_scope_string_to_expression(param)

0 commit comments

Comments
 (0)