Metadata-Version: 2.1
Name: bgpstream-website-collector
Version: 1.0.0
Summary: Downloads BGPStream info solely for research purposes
Author: Tony Zheng
Author-email: Justin Furuness <jfuruness@gmail.com>
License: Copyright 2020, 2021 Justin Furuness
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: homepage, https://github.com/jfuruness/bgpstream_website_collector.git
Keywords: Furuness,BGP,Hijack,Outage,Leak,BGPStream,Peers,Customers,Providers,BGPStream.com
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: beautifulsoup4 ==4.12.2
Requires-Dist: tqdm ==4.66.1
Requires-Dist: requests ==2.31.0
Requires-Dist: requests-cache ==1.1.1
Provides-Extra: test
Requires-Dist: types-beautifulsoup4 ~=4.12.0 ; extra == 'test'
Requires-Dist: types-requests ~=2.31.0 ; extra == 'test'
Requires-Dist: black ==23.7.0 ; extra == 'test'
Requires-Dist: pre-commit ==3.3.3 ; extra == 'test'
Requires-Dist: types-requests ==2.31.0 ; extra == 'test'
Requires-Dist: types-PyYAML ==6.0.11 ; extra == 'test'
Requires-Dist: mypy ==0.982 ; extra == 'test'
Requires-Dist: flake8 ==4.0.1 ; extra == 'test'
Requires-Dist: tox ==4.6.3 ; extra == 'test'
Requires-Dist: pytest-xdist ==2.5.0 ; extra == 'test'
Requires-Dist: ruff ==0.0.275 ; extra == 'test'

[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/)
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
![Tests](https://github.com/jfuruness/bgpstream_website_collector/actions/workflows/tests.yml/badge.svg)

# bgpstream\_website\_collector

* [Description](#package-description)
* [Usage](#usage)
* [Installation](#installation)
* [Testing](#testing)
* [Credits](#credits)
* [History](#history)
* [Development/Contributing](#developmentcontributing)
* [Licence](#license)


## Package Description

This package downloads information from bgpstream.com and stores it in a CSV

As a caveat, I wrote this a very long time ago when I was still an undergrad.
I've cleaned it up a bit, but this has a long way to go before it's good code quality
PRs welcome.
Also, almost everything is type ignored because mypy spazzes out with bs4
Also, the tests could really use a good update

## Usage
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

from a script:

```python
from pathlib import Path

from bgpstream_website_collector import BGPStreamWebsiteCollector


def main():
    csv_path: Path = Path.home() / "Desktop" / "bgpstream_website.csv"
    BGPStreamWebsiteCollector(csv_path=csv_path).run()


if __name__ == "__main__":
    main()
```

From the command line:

```
bgpstream_website_collector
```

## Installation
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

Install python and pip if you have not already.

Then run:

```bash
pip3 install pip --upgrade
pip3 install wheel
```

For production:

```bash
pip3 install bgpstream_website_collector
```

This will install the package and all of it's python dependencies.

If you want to install the project for development:
```bash
git clone https://github.com/jfuruness/bgpstream_website_collector.git
cd bgpstream_website_collector
pip3 install -e .[test]
pre-commit install
```

To test the development package: [Testing](#testing)


## Testing
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

To test the package after installation:

```
cd bgpstream_website_collector
pytest bgpstream_website_collector
ruff bgpstream_website_collector
black bgpstream_website_collector
mypy bgpstream_website_collector
```

If you want to run it across multiple environments, and have python 3.10 and 3.11 installed:

```
cd bgpstream_website_collector
tox
```

## Credits
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

Huge contributions to original version in lib_bgp_data to the testing from Tony Zheng

## History
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

TODO

## Development/Contributing
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Test it
5. Run tox
6. Commit your changes: `git commit -am 'Add some feature'`
7. Push to the branch: `git push origin my-new-feature`
8. Ensure github actions are passing tests
9. Email me at jfuruness@gmail.com if it's been a while and I haven't seen it

## License
* [bgpstream\_website\_collector](#bgpstream\_website\_collector)

BSD License (see license file)
