Skip to content

Commit

Permalink
Improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Agent-Hellboy committed Oct 17, 2024
1 parent 53b6b0e commit 703cea7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ A JSON file containing name as key
>>> l['a']['b']['c']['d']['e']['f']
1
refer `Tests_ <https://github.com/Agent-Hellboy/trace-dkey/tree/main/tests/>`_. for other examples
Documentation
=============

For more details, you can refer to the `documentation <https://agent-hellboy.github.io/trace-dkey/>`_.

General Info
============
Expand Down
27 changes: 27 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,30 @@ You can install Trace DKey using pip:
pip install trace-dkey
```

## Usage

### As a Command-Line Tool
You can use trace-dkey as a command-line tool:

```bash
python -m trace_dkey --file=test.json --key=name
```

### As a Python Library

You can use trace-dkey in your Python code as follows:

```python
from trace_dkey import trace

data = {'a': {'b': {'c': {'d': {'e': {'f': 1}}}}}}
path = trace(data, 'f')
print(path) # Output: [['a', 'b', 'c', 'd', 'e', 'f']]
```







25 changes: 0 additions & 25 deletions docs/usage.md

This file was deleted.

0 comments on commit 703cea7

Please sign in to comment.