Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amrdeveloper/pyql
PyQL 🐍 is a SQL-like query language to run on Python source code files instead of database files using the GitQL SDK.
https://github.com/amrdeveloper/pyql
database gitql gitql-sdk python query-language sql
Last synced: 12 days ago
JSON representation
PyQL 🐍 is a SQL-like query language to run on Python source code files instead of database files using the GitQL SDK.
- Host: GitHub
- URL: https://github.com/amrdeveloper/pyql
- Owner: AmrDeveloper
- License: mit
- Created: 2024-12-01T12:53:48.000Z (21 days ago)
- Default Branch: master
- Last Pushed: 2024-12-01T16:55:42.000Z (21 days ago)
- Last Synced: 2024-12-10T09:40:20.314Z (13 days ago)
- Topics: database, gitql, gitql-sdk, python, query-language, sql
- Language: Rust
- Homepage: https://crates.io/crates/pyql
- Size: 607 KB
- Stars: 18
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
PyQL - A Python Query Language
PyQL is a SQL like query language to run on Python source code files instead of database files using the GitQL SDK.
---
### Tables structures
#### Functions table
| Name | Type | Description |
| --------------- | ---------- | ---------------------------------------- |
| function_name | Text | The name of Python function |
| arguments_count | Integer | The number of arguments in this function |
| function | PyFunction | A pointer to that Function Node in AST |
| file_name | Text | File name that has this function |---
### Download or Install
- Install from Cargo.io
```
cargo install pyql
```- Build from source code
```
git clone https://github.com/AmrDeveloper/PyQL.git
cd PyQL
cargo build
```### Run PyQL
```
PyQL is a SQL like query language to run on Python source code files
Usage: PyQL [OPTIONS]Options:
-f, --files Path for local files to run query on
-s, --script Script file contains one or more query
-q, --query PyQL query to run on selected files
-p, --pagination Enable print result with pagination
-ps, --pagesize Set pagination page size [default: 10]
-o, --output Set output format [render, json, csv]
-a, --analysis Print Query analysis
-e, --editor Enable GitQL LineEditor
-h, --help Print PyQL help
-v, --version Print PyQL Current Version
```### License
```
MIT LicenseCopyright (c) 2024 Amr Hesham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```