semvec/pypi-packages huggingface dataset:
gpcontext-maker 1.5.0
Generate a context file of your whole software project to feed into a LLM like ChatGPT
License: MIT
Requires Python: >=3.9,<4.0

# ChatGPContextMaker

ChatGPContextMaker is a command-line utility that concatenates files in a directory and its subdirectories into a single file. It is particularly useful when you want to provide an entire program as context to an AI like ChatGPT to work on code projects.

# Features

- Recursively concatenate files from a directory and its subdirectories
- Provide a default output location (current working directory) and default output file name
- Prevent overwriting existing files by appending the current datetime to the output file name
- Easily installable and usable via pip and Poetry

## Installation

### Using pip

You can install ChatGPTContextMaker directly from PyPI using pip:

```
pip install gpcontext-maker
```

### Using Poetry

Alternatively, you can install ChatGPTContextMaker using Poetry:

1. Install Poetry, if you haven't already:
```
pip install poetry
```

2. Add ChatGPTContextMaker to your project's dependencies:
```
poetry add gpcontext-maker
```

## Usage

### As a command-line tool
To use ChatGPContextMaker as a command-line tool, you can run the following command in your terminal:

```
python -m gpcontext-maker /path/to/input/directory -o /path/to/output/directory -f output_file_name
```
* `/path/to/input/directory`: The directory containing the files you want to concatenate

* `/path/to/output/directory`: The directory where the concatenated file will be saved (default: current working directory)

* `output_file_name`: The name of the output file (default: context)

If a file with the same name already exists in the output directory, the current datetime will be appended to the output file name to prevent overwriting.

### As a module

You can also use ChatGPTContextMaker as a module in your Python script:

```
from chatgpcontextmaker import concat_files_recursive

source_directory = "/path/to/input/directory"
output_directory = "/path/to/output/directory"
output_file_name = "output_file_name"

output_file_path = os.path.join(output_directory, output_file_name)

concat_files_recursive(source_directory, output_file_path)
```

Replace `/path/to/input/directory`, `/path/to/output/directory`, and `output_file_name` with the appropriate paths and file name for your use case. The `concat_files_recursive` function will concatenate the files from the input directory and its subdirectories and save the result in the specified output file.


## Extending ChatGPTContextMaker

You can extend the functionality of ChatGPTContextMaker by modifying the `__main__.py` script in the chatgpcontextmaker package.

To contribute to the project, simply fork the [GitHub repository](https://github.com/estill01/ChatGPContextMaker), make your changes, and submit a pull request.
deep-sorted 0.0.3
Sorting of nested dicts and lists
License: MIT
Requires Python: >=3.8.1,<4.0
Keywords: sort,sorted,nested,recursive,deep,dict,list

# deep-sorted

![Testing and linting](https://github.com/danhje/deep-sorted/workflows/Test%20And%20Lint/badge.svg)
[![codecov](https://codecov.io/gh/danhje/deep-sorted/branch/master/graph/badge.svg)](https://codecov.io/gh/danhje/deep-sorted)
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/danhje/deep-sorted?include_prereleases)
![PyPI](https://img.shields.io/pypi/v/deep-sorted)

## Motivation

When validating parsed JSON objects, schemas and other nested data structures in unit tests, order
is typically not important. And yet I often find myself manually sorting the target structures
when the internals of the tested function is modified such that order is changed. With this package,
both the target and the actual structure can be recursively sorted before comparison.

## Installation

Using poetry:

```shell
poetry add deep-sorted
```

Using pipenv:

```shell
pipenv install deep-sorted
```

Using pip:

```shell
pip install deep-sorted
```

## Usage

```python
from deep_sorted import deep_sorted
from datetime import datetime

one = {
    "id": 9,
    "name": "Ted Chiang",
    "books": [
        {
            "id": 124,
            "published": datetime(1991, 8, 1, 0, 0),
            "title": "Understand",
            "ratings": (6, 6, 3, 5, 6, 6, 0, 6, 0),
        },
        {
            "id": 125,
            "published": datetime(2019, 5, 7, 0, 0),
            "title": "Exhalation",
        },
    ],
}

two = {
    "books": [
        {
            "published": datetime(2019, 5, 7, 0, 0),
            "title": "Exhalation",
            "id": 125,
        },
        {
            "ratings": (3, 0, 0, 6, 6, 6, 6, 5, 6),
            "id": 124,
            "published": datetime(1991, 8, 1, 0, 0),
            "title": "Understand",
        },
    ],
    "id": 9,
    "name": "Ted Chiang",
}

assert deep_sorted(one) == deep_sorted(two)
```