gitraze 0.2.4__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitraze-0.2.4 → gitraze-0.2.6}/PKG-INFO +82 -5
- {gitraze-0.2.4 → gitraze-0.2.6}/README.md +81 -4
- gitraze-0.2.6/gitraze/__init__.py +25 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/cli.py +1 -1
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/modules/search.py +0 -2
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/utils/helpers.py +18 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze.egg-info/PKG-INFO +82 -5
- {gitraze-0.2.4 → gitraze-0.2.6}/pyproject.toml +1 -1
- gitraze-0.2.4/gitraze/utils/__init__.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/LICENSE +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/config.py +0 -0
- {gitraze-0.2.4/gitraze → gitraze-0.2.6/gitraze/core}/__init__.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/core/api_graphql.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/core/api_rest.py +0 -0
- {gitraze-0.2.4/gitraze/core → gitraze-0.2.6/gitraze/handlers}/__init__.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/handlers/analyze.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/handlers/repo.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/handlers/search.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/handlers/user.py +0 -0
- {gitraze-0.2.4/gitraze/handlers → gitraze-0.2.6/gitraze/modules}/__init__.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/modules/analytics.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/modules/repo.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze/modules/user.py +0 -0
- {gitraze-0.2.4/gitraze/modules → gitraze-0.2.6/gitraze/utils}/__init__.py +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze.egg-info/SOURCES.txt +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze.egg-info/dependency_links.txt +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze.egg-info/entry_points.txt +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze.egg-info/requires.txt +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/gitraze.egg-info/top_level.txt +0 -0
- {gitraze-0.2.4 → gitraze-0.2.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitraze
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
|
|
5
5
|
Author: AK Pandey
|
|
6
6
|
License-Expression: MIT
|
|
@@ -65,7 +65,7 @@ pip install gitraze
|
|
|
65
65
|
|
|
66
66
|
## Usage
|
|
67
67
|
|
|
68
|
-
Run directly from your terminal:
|
|
68
|
+
### Run directly from your terminal:
|
|
69
69
|
|
|
70
70
|
Example:
|
|
71
71
|
```bash
|
|
@@ -103,14 +103,79 @@ Email : None
|
|
|
103
103
|
Twitter_username : None
|
|
104
104
|
|
|
105
105
|
```
|
|
106
|
-
>
|
|
106
|
+
> Commands prefixed with `$` should be run in your terminal.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
### Gitraze can also be used as a lightweight Python SDK.
|
|
109
109
|
|
|
110
|
+
#### User:
|
|
110
111
|
```python
|
|
111
|
-
import gitraze
|
|
112
|
+
import gitraze as gz
|
|
113
|
+
|
|
114
|
+
user = gz.user("octocat")
|
|
115
|
+
|
|
116
|
+
print(user["name"])
|
|
117
|
+
print(user["followers"])
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Search:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
results = gz.search(gz.REPOS, "machine learning", 3)
|
|
124
|
+
|
|
125
|
+
for repo in results:
|
|
126
|
+
print(repo["full_name"])
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Pretty-print results in terminal style:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from gitraze import *
|
|
133
|
+
|
|
134
|
+
display(user("octocat"))
|
|
112
135
|
```
|
|
113
136
|
|
|
137
|
+
Example output:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
Name : The Octocat
|
|
141
|
+
Login : octocat
|
|
142
|
+
Id : 583231
|
|
143
|
+
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
144
|
+
Type : User
|
|
145
|
+
User_view_type : public
|
|
146
|
+
Bio : None
|
|
147
|
+
Followers : 22578
|
|
148
|
+
Following : 9
|
|
149
|
+
Public_repos : 8
|
|
150
|
+
Public_gists : 8
|
|
151
|
+
Location : San Francisco
|
|
152
|
+
Profile_url : https://github.com/octocat
|
|
153
|
+
Created_at : 25 Jan 2011
|
|
154
|
+
Email : None
|
|
155
|
+
Twitter_username : None
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
> Note: **`import gitraze as gz`** is the recommended import.
|
|
159
|
+
|
|
160
|
+
## Available exports:
|
|
161
|
+
|
|
162
|
+
### Functions:
|
|
163
|
+
|
|
164
|
+
- `user()`
|
|
165
|
+
- `repo()`
|
|
166
|
+
- `search()`
|
|
167
|
+
- `display()`
|
|
168
|
+
|
|
169
|
+
### Constants:
|
|
170
|
+
|
|
171
|
+
- `USERS`
|
|
172
|
+
- `REPOS`
|
|
173
|
+
- `PRS`
|
|
174
|
+
- `ISSUES`
|
|
175
|
+
- `TOPICS`
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
114
179
|
⚠️ CLI commands are still evolving and may change.
|
|
115
180
|
|
|
116
181
|
## Philosophy
|
|
@@ -143,6 +208,18 @@ Gitraze is in active development:
|
|
|
143
208
|
|
|
144
209
|
If you're here early — you're basically a beta tester 😈
|
|
145
210
|
|
|
211
|
+
## Contributing
|
|
212
|
+
|
|
213
|
+
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
214
|
+
If you want to improve or modify Gitraze, go ahead.
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
git checkout -b feature/cool-thing
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Just keep the code clean and the terminal fast.
|
|
221
|
+
|
|
222
|
+
|
|
146
223
|
## License
|
|
147
224
|
|
|
148
225
|
MIT License — do whatever you want, just don’t blame me if you break stuff.
|
|
@@ -48,7 +48,7 @@ pip install gitraze
|
|
|
48
48
|
|
|
49
49
|
## Usage
|
|
50
50
|
|
|
51
|
-
Run directly from your terminal:
|
|
51
|
+
### Run directly from your terminal:
|
|
52
52
|
|
|
53
53
|
Example:
|
|
54
54
|
```bash
|
|
@@ -86,14 +86,79 @@ Email : None
|
|
|
86
86
|
Twitter_username : None
|
|
87
87
|
|
|
88
88
|
```
|
|
89
|
-
>
|
|
89
|
+
> Commands prefixed with `$` should be run in your terminal.
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
### Gitraze can also be used as a lightweight Python SDK.
|
|
92
92
|
|
|
93
|
+
#### User:
|
|
93
94
|
```python
|
|
94
|
-
import gitraze
|
|
95
|
+
import gitraze as gz
|
|
96
|
+
|
|
97
|
+
user = gz.user("octocat")
|
|
98
|
+
|
|
99
|
+
print(user["name"])
|
|
100
|
+
print(user["followers"])
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Search:
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
results = gz.search(gz.REPOS, "machine learning", 3)
|
|
107
|
+
|
|
108
|
+
for repo in results:
|
|
109
|
+
print(repo["full_name"])
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Pretty-print results in terminal style:
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from gitraze import *
|
|
116
|
+
|
|
117
|
+
display(user("octocat"))
|
|
95
118
|
```
|
|
96
119
|
|
|
120
|
+
Example output:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
Name : The Octocat
|
|
124
|
+
Login : octocat
|
|
125
|
+
Id : 583231
|
|
126
|
+
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
127
|
+
Type : User
|
|
128
|
+
User_view_type : public
|
|
129
|
+
Bio : None
|
|
130
|
+
Followers : 22578
|
|
131
|
+
Following : 9
|
|
132
|
+
Public_repos : 8
|
|
133
|
+
Public_gists : 8
|
|
134
|
+
Location : San Francisco
|
|
135
|
+
Profile_url : https://github.com/octocat
|
|
136
|
+
Created_at : 25 Jan 2011
|
|
137
|
+
Email : None
|
|
138
|
+
Twitter_username : None
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
> Note: **`import gitraze as gz`** is the recommended import.
|
|
142
|
+
|
|
143
|
+
## Available exports:
|
|
144
|
+
|
|
145
|
+
### Functions:
|
|
146
|
+
|
|
147
|
+
- `user()`
|
|
148
|
+
- `repo()`
|
|
149
|
+
- `search()`
|
|
150
|
+
- `display()`
|
|
151
|
+
|
|
152
|
+
### Constants:
|
|
153
|
+
|
|
154
|
+
- `USERS`
|
|
155
|
+
- `REPOS`
|
|
156
|
+
- `PRS`
|
|
157
|
+
- `ISSUES`
|
|
158
|
+
- `TOPICS`
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
97
162
|
⚠️ CLI commands are still evolving and may change.
|
|
98
163
|
|
|
99
164
|
## Philosophy
|
|
@@ -126,6 +191,18 @@ Gitraze is in active development:
|
|
|
126
191
|
|
|
127
192
|
If you're here early — you're basically a beta tester 😈
|
|
128
193
|
|
|
194
|
+
## Contributing
|
|
195
|
+
|
|
196
|
+
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
197
|
+
If you want to improve or modify Gitraze, go ahead.
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
git checkout -b feature/cool-thing
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Just keep the code clean and the terminal fast.
|
|
204
|
+
|
|
205
|
+
|
|
129
206
|
## License
|
|
130
207
|
|
|
131
208
|
MIT License — do whatever you want, just don’t blame me if you break stuff.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from .modules.user import get_user_rest as user
|
|
2
|
+
from .modules.repo import get_repo_rest as repo
|
|
3
|
+
from .modules.search import get_search_rest as search
|
|
4
|
+
|
|
5
|
+
from .utils.helpers import display
|
|
6
|
+
|
|
7
|
+
__version__ = "0.2.5"
|
|
8
|
+
|
|
9
|
+
USERS = "users"
|
|
10
|
+
REPOS = "repos"
|
|
11
|
+
PRS = "prs"
|
|
12
|
+
ISSUES = "issues"
|
|
13
|
+
TOPICS = "topics"
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"display",
|
|
17
|
+
"user",
|
|
18
|
+
"repo",
|
|
19
|
+
"search",
|
|
20
|
+
"USERS",
|
|
21
|
+
"REPOS",
|
|
22
|
+
"PRS",
|
|
23
|
+
"ISSUES",
|
|
24
|
+
"TOPICS",
|
|
25
|
+
]
|
|
@@ -41,7 +41,6 @@ def get_search_rest(category, query, limit=1):
|
|
|
41
41
|
"visibility": item.get("visibility"),
|
|
42
42
|
"default_branch": item.get("default_branch"),
|
|
43
43
|
"owner": item.get("owner", {}).get("login"),
|
|
44
|
-
"For More, use": "$ gitraze repo <owner/repo>"
|
|
45
44
|
})
|
|
46
45
|
|
|
47
46
|
case "users":
|
|
@@ -55,7 +54,6 @@ def get_search_rest(category, query, limit=1):
|
|
|
55
54
|
"followers_url": item.get("followers_url"),
|
|
56
55
|
"following_url": item.get("following_url"),
|
|
57
56
|
"organizations_url": item.get("organizations_url"),
|
|
58
|
-
"For More, use": "$ gitraze user <username>"
|
|
59
57
|
})
|
|
60
58
|
|
|
61
59
|
case "issues":
|
|
@@ -30,6 +30,24 @@ def pretty_print(data, title=None):
|
|
|
30
30
|
|
|
31
31
|
print() # spacing
|
|
32
32
|
|
|
33
|
+
def display(data, title=None):
|
|
34
|
+
|
|
35
|
+
if isinstance(data, list):
|
|
36
|
+
|
|
37
|
+
if not data:
|
|
38
|
+
print(Fore.RED + "No results found")
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
for i, item in enumerate(data, 1):
|
|
42
|
+
|
|
43
|
+
item_title = f"{title} [{i}]" if title else f"Result [{i}]"
|
|
44
|
+
|
|
45
|
+
pretty_print(item, title=item_title)
|
|
46
|
+
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
pretty_print(data, title=f"Result: ")
|
|
50
|
+
|
|
33
51
|
def format_date(date_str):
|
|
34
52
|
if not date_str:
|
|
35
53
|
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitraze
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
|
|
5
5
|
Author: AK Pandey
|
|
6
6
|
License-Expression: MIT
|
|
@@ -65,7 +65,7 @@ pip install gitraze
|
|
|
65
65
|
|
|
66
66
|
## Usage
|
|
67
67
|
|
|
68
|
-
Run directly from your terminal:
|
|
68
|
+
### Run directly from your terminal:
|
|
69
69
|
|
|
70
70
|
Example:
|
|
71
71
|
```bash
|
|
@@ -103,14 +103,79 @@ Email : None
|
|
|
103
103
|
Twitter_username : None
|
|
104
104
|
|
|
105
105
|
```
|
|
106
|
-
>
|
|
106
|
+
> Commands prefixed with `$` should be run in your terminal.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
### Gitraze can also be used as a lightweight Python SDK.
|
|
109
109
|
|
|
110
|
+
#### User:
|
|
110
111
|
```python
|
|
111
|
-
import gitraze
|
|
112
|
+
import gitraze as gz
|
|
113
|
+
|
|
114
|
+
user = gz.user("octocat")
|
|
115
|
+
|
|
116
|
+
print(user["name"])
|
|
117
|
+
print(user["followers"])
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Search:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
results = gz.search(gz.REPOS, "machine learning", 3)
|
|
124
|
+
|
|
125
|
+
for repo in results:
|
|
126
|
+
print(repo["full_name"])
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Pretty-print results in terminal style:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from gitraze import *
|
|
133
|
+
|
|
134
|
+
display(user("octocat"))
|
|
112
135
|
```
|
|
113
136
|
|
|
137
|
+
Example output:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
Name : The Octocat
|
|
141
|
+
Login : octocat
|
|
142
|
+
Id : 583231
|
|
143
|
+
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
144
|
+
Type : User
|
|
145
|
+
User_view_type : public
|
|
146
|
+
Bio : None
|
|
147
|
+
Followers : 22578
|
|
148
|
+
Following : 9
|
|
149
|
+
Public_repos : 8
|
|
150
|
+
Public_gists : 8
|
|
151
|
+
Location : San Francisco
|
|
152
|
+
Profile_url : https://github.com/octocat
|
|
153
|
+
Created_at : 25 Jan 2011
|
|
154
|
+
Email : None
|
|
155
|
+
Twitter_username : None
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
> Note: **`import gitraze as gz`** is the recommended import.
|
|
159
|
+
|
|
160
|
+
## Available exports:
|
|
161
|
+
|
|
162
|
+
### Functions:
|
|
163
|
+
|
|
164
|
+
- `user()`
|
|
165
|
+
- `repo()`
|
|
166
|
+
- `search()`
|
|
167
|
+
- `display()`
|
|
168
|
+
|
|
169
|
+
### Constants:
|
|
170
|
+
|
|
171
|
+
- `USERS`
|
|
172
|
+
- `REPOS`
|
|
173
|
+
- `PRS`
|
|
174
|
+
- `ISSUES`
|
|
175
|
+
- `TOPICS`
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
114
179
|
⚠️ CLI commands are still evolving and may change.
|
|
115
180
|
|
|
116
181
|
## Philosophy
|
|
@@ -143,6 +208,18 @@ Gitraze is in active development:
|
|
|
143
208
|
|
|
144
209
|
If you're here early — you're basically a beta tester 😈
|
|
145
210
|
|
|
211
|
+
## Contributing
|
|
212
|
+
|
|
213
|
+
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
214
|
+
If you want to improve or modify Gitraze, go ahead.
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
git checkout -b feature/cool-thing
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Just keep the code clean and the terminal fast.
|
|
221
|
+
|
|
222
|
+
|
|
146
223
|
## License
|
|
147
224
|
|
|
148
225
|
MIT License — do whatever you want, just don’t blame me if you break stuff.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|