Skip to main content
https://img.shields.io/pypi/dm/githsearch.svg

githsearch

Quick github search from the command line

Installation

pip install githsearch

Usage as a command line tool

options :
    -h or --help : display instructions
    -r or --repo [args] : search for args in github repos
    -u or --user [args] : search for args in github users
    -l or --limit : know your rate limit
example :
    githsearch -r python tetris

sample output :
--> https://github.com/davidcollins4481/tetris-clone
    -- Tetris Clone in Python (PyGame)
--> https://github.com/zxmarcos/pytrix
    -- Tetris clone in Python + PyGame
--> https://github.com/nickcrafford/python-pygame-tetris
    -- Quick and dirty Tetris clone written to learn Pygame.
--> https://github.com/davepgreene/tetris-clone
    -- A Tetris clone written in Python with pygame

(Bonus : lines alternate in a purple color which is cute)

Using GithSearch programmatically

You can search for repos or users. First instantiate the main class, and to search for a repo call get_repo and pass the terms you want to search as arguments :

>>> from githsearch import GithSearch
>>> g=GithSearch()
>>> g.get_repo('python tetris clone pygame')
[('https://github.com/davidcollins4481/tetris-clone',
'Tetris Clone in Python (PyGame)'),
('https://github.com/zxmarcos/pytrix', 'Tetris clone in Python + PyGame'),
('https://github.com/nickcrafford/python-pygame-tetris',
'Quick and dirty Tetris clone written to learn Pygame.'),
('https://github.com/davepgreene/tetris-clone',
'A Tetris clone written in Python with pygame'),
('https://github.com/AndreiMarks/BlindBlocks',
'Tetris Clone written in Python 3.2 using Pygame 1.9.2'),
('https://github.com/dannyburrows/PoorMansTetris',
'A Tetris clone, using python and pygame'), ...]

The search outputs the most relevant results. To search for a user is the same but call get_user instead

>>> g.get_user('test')
[('test', 'https://github.com/test'),
('prinnotamago', 'https://github.com/prinnotamago'),
('diannt', 'https://github.com/diannt'),
('73153', 'https://github.com/73153'),
('ssweetin', 'https://github.com/ssweetin'),
('deekoder', 'https://github.com/deekoder'),
('songkang666', 'https://github.com/songkang666'),
('ArdentZeal', 'https://github.com/ArdentZeal'),
('gitmobiletest', 'https://github.com/gitmobiletest'), ...]

But be aware that githsearch uses the free quotas from github search API so there is a rate limit. You can consult it by calling :

>>> g.get_limit
{'remaining': 10, 'reset': 1453497872, 'limit': 10}

As long as you don’t hammer down the API you should be okay.

Changes :

Feb 2016 : added Command line tool, refactoring, changed readme from markdown to restructuredtext so that it looks better on the Pypi.

Release files for githsearch 0.1.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 githsearch 0.1.1
File Size Uploaded
githsearch-0.1.1.tar.gz 4.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for githsearch 0.1.1
File Interpreter ABI Platform
githsearch-0.1.1-py3.4.egg Legacy Egg format - - Details
githsearch-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / githsearch-0.1.1.tar.gz

Download URL githsearch-0.1.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cf2b1cad9a62895884a1fc0a1a77318bdd28ea97cc30f3fc85ac6a992f8e956e
BLAKE2b-256 checksum
How to use checksums
8490ae0f801cd27f805b0999f55b5d58953bf12ebc321875fbd111c293a6e26d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / githsearch-0.1.1-py3.4.egg

Download URL githsearch-0.1.1-py3.4.egg
Size 6.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
0d6f6e18452bc661363fdba124f51120e30de2be97918552729a64de270b5c80
BLAKE2b-256 checksum
How to use checksums
342f96e39293b9ac4e05b2892461dff98572ec2a2cc8eb09d6d3d5d569fb8a37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / githsearch-0.1.1-py3-none-any.whl

Download URL githsearch-0.1.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6441e99b1cb5092bf9a2a52cf482bd22822a49feee15f3c5434677d715119269
BLAKE2b-256 checksum
How to use checksums
5b878d8af267ee0e8f6e7feb3efe1ee9cdc7132dfbd2423d4dbe4719ad15a0dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

3 release files

0.1.0

3 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