Moved esd.py into the moonstreamcrawlers package

Also removed requirements.txt - it had windows-specific pywin32 that
just failed to load on Linux.

`moonstreamcrawlers` environments should be set up using `setup.py`.
pull/27/head
Neeraj Kashyap 2021-07-28 20:22:10 -07:00
rodzic 5c6dc77392
commit f027f6bc6b
7 zmienionych plików z 39 dodań i 203 usunięć

1
crawlers/.gitignore vendored
Wyświetl plik

@ -165,3 +165,4 @@ prod.env
prod.env.ps1
dev.env.ps1
.venv
.crawlers

Wyświetl plik

@ -1 +1,32 @@
# moonstream crawlers
# moonstream crawlers
## Crawler: Ethereum Signature Database
This crawler retrieves Ethereum function signatures from the Ethereum Signature Database at
[https://4byte.directory](https://4byte.directory).
### Installation
(Use Python 3)
```bash
pip install -r requirements.txt
```
### Database access
Make sure that the `EXPLORATION_DB_URI` environment variable is set as a Postgres connection string.
For a sample, view [`sample.env`](./sample.env).
### Crawling ESD function signatures
```bash
python esd.py --interval 0.3 functions
```
### Crawling ESD event signatures
```bash
python esd.py --interval 0.3 events
```

Wyświetl plik

@ -1,171 +0,0 @@
# Created by https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=python,visualstudiocode
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
# Custom
dev.env
prod.env
alembic.dev.ini
alembic.prod.ini
.db/
.venv/
.esd/
.secrets/

Wyświetl plik

@ -1,30 +0,0 @@
# Crawler: Ethereum Signature Database
This crawler retrieves Ethereum function signatures from the Ethereum Signature Database at
[https://4byte.directory](https://4byte.directory).
### Installation
(Use Python 3)
```bash
pip install -r requirements.txt
```
### Database access
Make sure that the `EXPLORATION_DB_URI` environment variable is set as a Postgres connection string.
For a sample, view [`sample.env`](./sample.env).
### Crawling ESD function signatures
```bash
python esd.py --interval 0.3 functions
```
### Crawling ESD event signatures
```bash
python esd.py --interval 0.3 events
```

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -32,7 +32,12 @@ setup(
packages=find_packages(),
package_data={"moonstreamcrawlers": ["py.typed"]},
zip_safe=False,
install_requires=["web3"],
install_requires=[
"moonstreamdb @ git+https://git@github.com/bugout-dev/moonstream.git@876c23aac10f07da700798f47c44797a4ae157bb#egg=moonstreamdb&subdirectory=db",
"requests",
"tqdm",
"web3"
],
extras_require={"dev": ["black", "mypy"]},
entry_points={
"console_scripts": ["moonstreamcrawlers=moonstreamcrawlers.cli:main"]