semvec/pypi-packages huggingface dataset:
cpgqls-client 0.0.9
A client library for CPGQL servers
Requires Python: >=3.7

## cpgqls-client-python

`cpgqls-client-python` is a simple Python library for communicating with an instance of
a Code Property Graph Query Language server.

### Requirements

Python 3.7+

### Installation

```
pip install cpgqls-client
```

### Example usage

A prerequisite for the following example is access to a running instance of a
Code Property Graph server. An easy way to set one up is by using the open
source code analyzer [joern](https://joern.io):

```bash
$ ./joern --server
```

```python
from cpgqls_client import CPGQLSClient, import_code_query, workspace_query

server_endpoint = "localhost:8080"
basic_auth_credentials = ("username", "password")
client = CPGQLSClient(server_endpoint, auth_credentials=basic_auth_credentials)

# execute a simple CPGQuery
query = "val a = 1"
result = client.execute(query)
print(result)

# execute a `workspace` CPGQuery
query = workspace_query()
result = client.execute(query)
print(result['stdout'])

# execute an `importCode` CPGQuery
query = import_code_query("/home/user/code/x42/c", "my-c-project")
result = client.execute(query)
print(result['stdout'])

query = import_code_query("/home/user/code/x42/java/X42.jar", "my-java-project")
result = client.execute(query)
print(result['stdout'])

```

### Running the test suite

```bash
# set up the virtual environment
$ python -m venv .venv
$ . .venv/bin/activate

# install the dependencies
$ pip install -r requirements.txt
$ pip install -r requirements-tests.txt

# run the tests
$ python -m pytest
```

### References

* Code Property Graph specification and tools
  https://github.com/ShiftLeftSecurity/codepropertygraph/
* The open source code analyzer joern: https://joern.io
ansys-tools-example-coverage 0.1.0
Tools to assess the docstring examples coverage.
Requires Python: >=3.6

ansys-tools-example-coverage
----------------------------
The ``ansys-tools-example-coverage`` library is intended to assess and report the docstring examples coverage
of modules and submoldules from a given directory.
example-coverage is licensed under the `MIT License
<https://github.com/pyansys/example-coverage/blob/main/LICENSE>`_.


What does this library do?
--------------------------
``ansys-tools-example-coverage`` displays the number of documentation strings containing
examples following either the `numpydoc <https://numpydoc.readthedocs.io/en/latest/format.html>`_ or
`Google-Style <https://google.github.io/styleguide/pyguide.html>`_.

Example usage:

.. code::

    python -m ansys.tools.example_coverage -f "path_to_package"

    Name                                      Methods     Missed   Covered
    -----------------------------------------------------------------------
    my_package.my_module_a.sub_module_a             3          3       0.0%
    my_package.my_module_a.sub_module_b             6          3      50.0%
    my_package.my_module_a.sub_module_c             1          0     100.0%
    my_package.my_module_b                          4          1      75.0%
    -----------------------------------------------------------------------
    Total                                          14          7        50%

Installation
------------
Install with:

.. code::

   pip install ansys-tools-example-coverage



Issues
------------------------
To post issues, questions, and code, go to `example-coverage Issues
<https://github.com/pyansys/example-coverage/issues>`_.



License
-------
``ansys-tools-example-coverage`` is licensed under the MIT license.