https://github.com/leetcode-opensource/py-sourcemap
A tiny source-map-mappings bindings for python using PyO3
https://github.com/leetcode-opensource/py-sourcemap
Last synced: 7 months ago
JSON representation
A tiny source-map-mappings bindings for python using PyO3
- Host: GitHub
- URL: https://github.com/leetcode-opensource/py-sourcemap
- Owner: LeetCode-OpenSource
- License: mit
- Created: 2018-08-31T04:04:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-07T09:54:05.000Z (over 2 years ago)
- Last Synced: 2025-04-17T07:54:06.392Z (8 months ago)
- Language: Python
- Size: 349 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# py-sourcemap
[](https://circleci.com/gh/LeetCode-OpenSource/py-sourcemap)
[](https://travis-ci.com/LeetCode-OpenSource/py-sourcemap)
[](https://ci.appveyor.com/project/Brooooooklyn/py-sourcemap/branch/master)
A tiny [source-map-mappings](https://github.com/fitzgen/source-map-mappings) bindings for python using [PyO3](https://github.com/PyO3/pyo3)
# Platform Support
### Operating Systems
| Linux | macOS | Windows x86 | Windows x64 |
| ----- | ----- | ----------- | ----------- |
| ✓ | ✓ | ✓ | ✓ |
### Python
| Python3.5 | Python3.6 | Python3.7 |
| --------- | --------- | --------- |
| ✓ | ✓ | ✓ |
# Usage
```python
from py_sourcemap import SourcemapParser
sourcemap_parser = SourcemapParser("./tests/index.js.map")
# pass line, column in, start from 1
sourcemap_parser.original_location_for(1, 195303) # (original_line, original_column, source_file_name, function_name_in_source) start from 1
```