Skip to main content

Space Reader

space-reader is a tool that can read a workspace URL and convert the content into LLM-friendly format.

Installation

pip install sreader

Usage

from sreader import read

read("<workspace URL>")

Support Workspace

  • Local File (e.g., /Users/user/desktop/demo.pdf)
  • Local Directory (e.g., /Users/user/desktop/demo)
  • Remote File with Access (e.g., https://example.com/demo.pdf)
  • GitHub Repo with Access (e.g., https://github.com/user/demo)

Support Formats

Markdown

read("<workspace URL>", format="markdown")

"""
## /Users/user/desktop/demo
- ****
  - a.py
  - c.py
  - b.py
  - **d**
    - g.py
    - **f**
      - f.py
  - **e**
"""

JSON and Dict

read("<workspace URL>", format="json")  # or "dict"

"""
{
    "/Users/user/desktop/demo": {
        "files": [
            "a.py",
            "c.py",
            "b.py"
        ],
        "dirs": {
            "d": {
                "files": [
                    "g.py"
                ],
                "dirs": {
                    "f": {
                        "files": [
                            "f.py"
                        ],
                        "dirs": {}
                    }
                }
            },
            "e": {
                "files": [],
                "dirs": {}
            }
        }
    }
}
"""

Tree

read("<workspace URL>", format="tree")

"""
/Users/user/desktop/demo
└── 
    ├── a.py
    ├── c.py
    ├── b.py
    ├── d
    │   ├── g.py
    │   └── f
    │       └── f.py
    └── e
"""

Examples

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for sreader 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sreader 0.0.1
File Size Uploaded
sreader-0.0.1.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sreader 0.0.1
File Interpreter ABI Platform
sreader-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / sreader-0.0.1.tar.gz

Download URL sreader-0.0.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
84592984f251491609b67b84154dea116d6f6efd87273c3038de04a9db213713
BLAKE2b-256 checksum
How to use checksums
fd086a5de70f1aadd929bf1a7d8bd9066a6029fdf322dbf59d0784ce7111ee30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / sreader-0.0.1-py3-none-any.whl

Download URL sreader-0.0.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba827363652eaf77e7b4b5e80af84d0e4107a666e7c9dff730fefc043d23b57e
BLAKE2b-256 checksum
How to use checksums
d4b0cc76a2c705d0c8bf0e3e272ab357249f8894bc94402bda18d3a7c3b3fcf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page