semvec/pypi-packages huggingface dataset:
source-hunter 0.40
Tool for analysis of code dependency and calling relationship
License: MIT
Keywords: source,dependency,calling,relationship,graph,analysis

# Source Hunter
A convinient tool for analysing the dependency and calling relationship of source code.

while coding on large project, one may sometimes face the embarrassing situation to change the very base data models 
or interfaces which may have chance to break a lot of things.
There are some tools like [pydeps](https://pydeps.readthedocs.io/en/latest/) which gives you clue about what other modules
your current module depends on(dependency graph), but it won't tell which modules will be affected if you change your
module(calling graph). Source hunter is aiming at providing both calling and dependency graph at the same time.

## Installation
### Prerequisite
1. `Graphviz` is needed for rendering
2. The python wrapper named `graphviz`
#### How to install Graphviz
```bash
# On Ubuntu/Debian
sudo apt install graphviz

# On mac
brew install graphviz 

# On Centos/Fedora
sudo yum install graphviz

```

#### How to install graphviz the python package
If you install source_hunter using pip, you don't need to install this package manually. Otherwise, you may install
`graphviz` by `pip install graphviz`

### Install using pip:
```bash
pip install source_hunter
```
 
### Install from source code:
```bash
git clone https://github.com/pyeprog/source_hunter.git
cd source_hunter
python setup.py install
```

## Usage
```bash
# for help
hunt -h

# basic usage 
hunt [project_root_path] [target_module_file] [function_or_class]

# example
# search Usage of `YourModel` of `target_model.py` in current path
# and save the output pdf file at `~/saving/dir/saving_file_name.pdf`
# while ignoring all files with `test`, `pb2` or `migration` in its names.
cd ~/example_project
hunt . ./model/target_model.py YourModel \
    --path ~/saving/dir \
    --name saving_file_name \
    --ignore test --ignore pb2 --ignore migration
    
# output only to stdout
hunt . ./model/target_model.py YourModel --stdout

```

## Output
Parse [flask_reddit](https://github.com/codelucas/flask_reddit)
```bash
cd flask_reddit
hunt . ./flask_reddit/users/models.py User
hunt . ./flask_reddit/users/models.py User --stdout

```
![pdf](https://github.com/pyeprog/source_hunter/blob/master/imgs/screen.png)


```bash
cd flask_reddit
hunt . ./flask_reddit/users/models.py User --stdout

```
![shell](https://github.com/pyeprog/source_hunter/blob/master/imgs/shell.png)

## limitation
1. Support only python3 project (will support more language soon)
2. Not support `import a as b` or `from a import b as c`

## Change log
- v0.40:
    - Add support for dependency graph
    - refactor python parser
- v0.36:
    - Add logger
    - refactor parser
- v0.35: 
    - Add support for png and pdf output format
    - fix stdout mal-format
- v0.34: 
    - Add support for parsing relative import of python project
- v0.33: 
    - Add python parser and graphviz for pdf output
Dome9AWSSGAnalyzer 1.0.1
Get AWS-SG Details to respond to incidents quickly.
License: MIT
Keywords: Dome9,AWS,Security Groups,Dome9v2API

Dome9-SG-LookUp
---------------

Dome9-SG-LookUp (SGAnalyzerApp) uses Dome9 APIs to get information
about the Security Groups present in the account.

Running the App
---------------

::

	from SGAnalyzerAppDir import app

    app.main()


Features
--------

- Get details of Security Group provided SG-ID.
- Get details of Security Group by SG-Name in JSON.
- Get details of Security Group rules in JSON provided SG-ID.

Usage
-----

- Step 1: Enter the api-details in the api-config file, apiURL will be there
  already, enter the apiSecret and apiKey.
- Step 2: You can add associated Dome9 "cloudAccountId" with your AWS account ID
  as <Dome9clo-udac-coun-tIDE-nterhereonly>=<AWSAcIDhere> as a map under
  [aws-dome9-map] in api-config.ini file.
- Step 3: If you wish to create this as a package, use pyinstaller to package it
  and use shutil to keep api-config.ini file at the bottom of spec file.
- First button - Details by SGID - provides information filled in the boxes
  automatically when user hit the button after providing SGID in the box.
  Feel free to copy or reset by then.
- Second button is to reset the results.
- Third Button - Rules By SGID - provides a JSON format inbound and outbound
  configuration downloaded at the same location.
- Fourth Button - SGs by Name - provides a JSON format file including all the
  Security Group configuration as provided by user in SGName field.
- Will be adding more functionality and a new look to this initiative in near
  future.

HowToRun
--------

- Please find below the console snapshot from PyCharm:

import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\nitin.sharma\\PycharmProjects\\Dome9-SG-LookUp', 'C:/Users/nitin.sharma/PycharmProjects/Dome9-SG-LookUp'])
PyDev console: starting.
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
>> from SGAnalyzerAppDir import app
>> app.main()