Metadata-Version: 2.1
Name: eips
Version: 0.0.2
Summary: Ethereum Improvement Proposal (EIP) ETL library
Project-URL: Source code, https://github.com/mikeshultz/eips
Author-email: Mike Shultz <mike@mikeshultz.com>
License: MIT License
License-File: LICENSE
Keywords: eip,ethereum,etl
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: click~=8.1
Requires-Dist: dulwich~=0.21.6
Requires-Dist: pydantic~=2.3.0
Requires-Dist: python-dateutil~=2.8.2
Requires-Dist: typing-extensions<5,>=4.0
Provides-Extra: dev
Requires-Dist: black>=23.9.1; extra == 'dev'
Requires-Dist: hatch>=1.7.0; extra == 'dev'
Requires-Dist: isort>=5.12.0; extra == 'dev'
Requires-Dist: mypy>=1.5.1; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=7.4.2; extra == 'dev'
Description-Content-Type: text/markdown

# Ethereum Improvement Proposal (EIP) Processor

CLI tools and Python library for interacting with EIPs from the [source EIPs GitHub repository](https://github.com/ethereum/EIPs).

## Features/TODO

Frontend

- [X] CLI tools
- [X] Library API
- [ ] Documentation

Data processing:

- [X] EIP Metadata processing
- [ ] EIP relationships and references
- [ ] Automated tagging
- [ ] File history, changelog
- [X] Aggregate data, statistics, and error detection

## Usage

### Show EIP

```bash
eips show 20
```

### Show EIP Headers

```bash
eips show -i 4626
```

## API Usage

### Get an EIP

```python
>>> from eips import EIPs
>>> eips = EIPs()
>>> eip_20 = eips.get(20)[0]
>>> eip_20.title
'Token Standard'
```

### Get all EIPs

```python
>>> from eips import EIPs
>>> eips = EIPs()
>>> for e in eips.get():
...   print(e.eip_id)
... 
2018
5216
999
606
[...]
```

### Get count of EIPs

```python
>>> from eips import EIPs
>>> eips = EIPs()
>>> eips.len()
687
```

### Get EIPs aggregate stats

```python
>>> from eips import EIPs
>>> eips = EIPs()
>>> eips.stats().total
687
>>> eips.stats().errors
0
>>> [c.value for c in eips.stats().categories]
['ERC', 'Core', 'Interface', 'Networking']
>>> [s.value for s in eips.stats().statuses]
['Stagnant', 'Last Call', 'Withdrawn', 'Final', 'Review', 'Draft', 'Living']
>>> [t.value for t in eips.stats().types]
['Standards Track', 'Meta', 'Informational']
```

## Development

### Run Tests

```bash
hatch run test
```

### Linting

```bash
hatch run lint
```

### Release

```bash
# Bump the version major/minor/patch
hatch version patch
# Tag the git commit with the version
git tag -a "v$(hatch version)" -m "v$(hatch version)"
# Push it up to GH, don't forget the tag
git push --follow-tags
```

Now [create a GitHub release](https://github.com/mikeshultz/python-eips/releases/new) and CI will do the rest.
