semvec/pypi-packages huggingface dataset:
cedarscript-ast-parser 0.7.0
A library for parsing and interpreting CEDARScript, a SQL-like language for code analysis and transformations
License: Apache-2.0
Requires Python: >=3.8
Keywords: parser, ast, cedarscript, code-editing, refactoring, code-analysis, sql-like, ai-assisted-development

# CEDARScript AST Parser

[![PyPI version](https://badge.fury.io/py/cedarscript-ast-parser.svg)](https://pypi.org/project/cedarscript-ast-parser/)
[![Python Versions](https://img.shields.io/pypi/pyversions/cedarscript-ast-parser.svg)](https://pypi.org/project/cedarscript-ast-parser/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

`CEDARScript AST Parser` is a Python library for parsing and interpreting `CEDARScript`, a SQL-like language designed for concise code analysis, manipulation, and refactoring tasks.

## What is CEDARScript?

[CEDARScript](https://bit.ly/cedarscript) (_Concise Examination, Development, And Refactoring Script_) is a domain-specific language that
aims to improve how AI coding assistants interact with codebases and communicate their code modification intentions.
It provides a standardized way to express complex code modification and analysis operations, making it easier for 
AI-assisted development tools to understand and execute these tasks.

## Features

- Parse `CEDARScript` Abstract Syntax Tree (`AST`) that was generated by Tree-Sitter into a list of commands
- Support for various code manipulation and analysis commands (CREATE, UPDATE, RM, MV, SELECT)
- Return results in `XML` format for easier parsing and processing by LLM systems

## Installation

You can install CEDARScript Parser using pip:

```
pip install cedarscript-ast-parser
```

## Usage

Here's a quick example of how to use CEDARScript Parser:

```python
from cedarscript_ast_parser import CEDARScriptASTParser

parser = CEDARScriptASTParser()
code = """
CREATE FILE "example.py"
UPDATE FILE "example.py"
    INSERT AT END OF FILE
        CONTENT
            print("Hello, World!")
        END CONTENT
END UPDATE
"""

commands, errors = parser.parse_script(code)

if errors:
    for error in errors:
        print(f"Error: {error}")
else:
    for command in commands:
        print(f"Parsed command: {command}")
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License.
dtx-assessment-api 0.10.1
detoxio.ai - Assessment Findings to Platform syncup api client
License: Apache-2.0
Requires Python: <4.0,>=3.10

`dtx-assessment-client-py` is a Python library that provides an API client for interacting with the Detoxio Assessment API. This client simplifies the process of sending assessment findings and managing assessment data within the Detoxio platform.

## Installation

To install `dtx-assessment-client-py`, you can use pip:

```bash
pip install dtx-assessment-client-py
```

Alternatively, you can clone the repository and install it manually:

```bash
git clone https://github.com/yourusername/dtx-assessment-client-py.git
cd dtx-assessment-client-py
pip install .
```

## Usage

Below are examples of how to use the `dtx-assessment-client-py` library to interact with the Detoxio Assessment API.

### Creating a Client

First, you need to create an instance of the `AssessmentFindingClient`. You will need the base URL of your API endpoint and an API key for authentication.

```python
from dtx_assessment_api.finding_client import AssessmentFindingClient

# Replace with your API base URL and API key
base_url = "https://api.example.com/"
api_key = "your_api_key_here"

# Initialize the client
client = AssessmentFindingClient(base_url, api_key)
```

### Posting an Assessment Finding

To post an assessment finding, you need to create an `AssessmentFinding` object and then use the `post` method of the client.

```python
from dtx_assessment_api.finding import AssessmentFinding, AssessmentRun, AssessmentTarget

# Example data for creating an AssessmentFinding
run = AssessmentRun(run_id="run-1234")
target = AssessmentTarget(target_id="target-5678", target_type="example_target_type")
finding = AssessmentFinding(run=run, target=target, finding_id="finding-91011")

# Post the assessment finding
response = client.post(finding)

print("Response Status Code:", response.status_code)
print("Response Body:", response.text)
```

## Configuration

You can configure the client by passing different parameters during initialization. Ensure that you have the correct base URL and a valid API key. The client handles authentication via Bearer tokens.

```python
client = AssessmentFindingClient(base_url="https://api.example.com/", api_key="your_api_key_here")
```

## Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

### Steps to Contribute

1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Make your changes and commit them with descriptive messages.
4. Push your changes to your fork.
5. Submit a pull request to the main repository.

Please ensure your code follows the project's coding standards and includes appropriate tests.