Skip to content

mikeshultz/python-eips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Improvement Proposal (EIP) Processor

CLI tools and Python library for interacting with EIPs from the source EIPs GitHub repository.

Features/TODO

Frontend

  • CLI tools
  • Library API
  • Documentation

Data processing:

  • EIP Metadata processing
  • EIP relationships and references
  • Automated tagging
  • File history, changelog
  • Aggregate data, statistics, and error detection
  • Indicate document deletion in some fashion (file flag, and empty props?)

Usage

Show EIP

eips show 712

Show EIP Headers

eips show -i 4626

Show ERC

eips show 20

API Usage

Get an EIP

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

Get all EIPs

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

Get count of EIPs

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

Get EIPs aggregate stats

>>> 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

hatch run test

Linting

hatch run lint

Release

To release, create and publish a GitHub package release

# 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 and CI will do the rest.

About

Python library for EIP parsing and interaction

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages