{ "info": { "author": "Jason Carver", "author_email": "ut96caarrs@snkmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Database :: Front-Ends", "Topic :: Internet :: Finger", "Topic :: Internet :: Name Service (DNS)", "Topic :: Security :: Cryptography", "Topic :: System :: Distributed Computing", "Topic :: System :: Systems Administration :: Authentication/Directory", "Topic :: Utilities" ], "description": "Bid on '.eth' ENS names with Python\n===================================\n\n|Join the chat at https://gitter.im/ens-py/Lobby|\n\nAccess the Ethereum Name Service Auction using this python library.\nNote: **this is a work in progress**\n\nUsing this library is not a way to skip learning how ENS works. If you\nare registering a name, a small misunderstanding can cause you to lose\n**all** your deposit. Go `read about\nENS `__ first. Your\nfunds are your responsibility.\n\nBeta-quality warning\n--------------------\n\nThis is a preview for developers, and an invitation for contributions.\nPlease do not use this in production until this warning is removed,\nespecially when putting funds at risk. Examples of funds being at risk\ninclude: sending ether/tokens to resolved addresses and participating in\nname auctions.\n\nIf you supply the a domain with type ``bytes``, it will be assumed to be\nUTF-8 encoded, like in `Ethereum\ncontracts `__.\n\nSetup\n-----\n\n::\n\n pip install ensauction\n\nAny issues? See `Setup details <#setup-details>`__\n\nUsage\n-----\n\nAll examples in Python 3\n\nAuctions for names ending in .eth\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nGet auction status\n^^^^^^^^^^^^^^^^^^\n\nExample with domain 'payment.eth':\n\n.. code:: py\n\n from ensauction.auto import ethnames\n from ensauction.registrar import Status\n\n status = ethnames.status('payment.eth')\n\n| If you get an error here, like: > UnhandledRequest: No providers\n responded to the RPC request:\n| method:eth\\_getBlockByNumber\n| params:['latest', False]\n\nThen you are not connected to your node. See below `how to manually\nconnect to your node <#optionally-a-custom-web3-provider>`__.\n\nOtherwise, continue...\n\n.. code:: py\n\n # if you forget to strip out .eth, ens.py will do it for you\n assert ethnames.status('payment') == status\n\n # these are the possible statuses\n\n assert status in (\n Status.Open,\n Status.Auctioning,\n Status.Owned,\n Status.Forbidden,\n Status.Revealing,\n Status.NotYetAvailable\n )\n\n\n # if you get the integer status from another source, you can compare it directly\n\n assert Status.Owned == 2\n\nStart auctions\n^^^^^^^^^^^^^^\n\n.. code:: py\n\n # start one auction (which tips people off that you're interested)\n\n ethnames.start('you_saw_him_repressin_me_didnt_ya')\n\n\n # start many auctions (which provides a bit of cover)\n\n ethnames.start(['exchange', 'tickets', 'payment', 'trading', 'registry'])\n\nBid on auction\n^^^^^^^^^^^^^^\n\nBid on a 'trading.eth' with 5211 ETH, and secret \"I promise I will not\nforget my secret\":\n\n.. code:: py\n\n from web3.auto import w3\n\n ethnames.bid(\n 'trading',\n Web3.toWei('5211', 'ether'),\n \"I promise I will not forget my secret\",\n transact={'from': w3.eth.accounts[0]}\n )\n\n(if you want to \"mask\" your bid, set a higher value in the transact\ndict)\n\nReveal your bid\n^^^^^^^^^^^^^^^\n\nYou must **always** reveal your bid, whether you won or lost. Otherwise\nyou will lose the full deposit.\n\nExample of revealing your bid on 'registry.eth' with 0.01 ETH, and\nsecret \"For real, though: losing your secret means losing ether\":\n\n.. code:: py\n\n ethnames.reveal(\n 'registry',\n Web3.toWei('0.01', 'ether'),\n \"For real, though: losing your secret means losing ether\",\n transact={'from': w3.eth.accounts[0]}\n )\n\nClaim the name you won\n^^^^^^^^^^^^^^^^^^^^^^\n\naka \"Finalize\" auction, which makes you the owner in ENS.\n\n.. code:: py\n\n ethnames.finalize('gambling')\n\nGet detailed information on an auction\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFind out the owner of the auction Deed -- see `docs on the\ndifference `__\nbetween owning the name and the deed\n\n.. code:: py\n\n deed = ethnames.deed('ethfinex')\n\n assert deed.owner() == '0x9A02ed4Ca9AD55b75fF9A05DeBb36D5eb382E184'\n\nWhen was the auction completed? (a timezone-aware datetime object)\n\n.. code:: py\n\n close_datetime = ethnames.close_at('ethfinex')\n\n assert str(close_datetime) == '2017-06-05 08:10:03+00:00'\n\nHow much is held on deposit?\n\n.. code:: py\n\n from decimal import Decimal\n from web3 import Web3\n\n deposit = ethnames.deposit('ethfinex')\n\n assert Web3.fromWei(deposit, 'ether') == Decimal('0.01')\n\nWhat was the highest bid?\n\n.. code:: py\n\n top_bid = ethnames.top_bid('ethfinex')\n\n assert Web3.fromWei(top_bid, 'ether') == Decimal('201709.02')\n\nSetup details\n-------------\n\nIf Python 2 is your default, or you're not sure\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn your shell\n\n::\n\n if pip --version | grep \"python 2\"; then\n python3 -m venv ~/.py3venv\n source ~/.py3venv/bin/activate\n fi\n\nNow, with Python 3\n~~~~~~~~~~~~~~~~~~\n\nIn your shell: ``pip install ensauction``\n\n*ensauction.py* requires an up-to-date Ethereum blockchain, preferably\nlocal. If your setup isn't working, try running ``geth --fast`` until\nit's fully-synced. I highly recommend using the default IPC\ncommunication method, for speed and security.\n\n\"No matching distribution found for ensauction\"\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you are seeing something like:\n\n::\n\n Collecting ensauction\n Could not find a version that satisfies the requirement ensauction (from versions: )\n No matching distribution found for ensauction\n\nIt is most likely that you are in Python 2. Retry the first Setup\nsection, to make sure you're in Python 3\n\nUse a custom web3 provider\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn Python:\n\n::\n\n from ensauction.registrar import Registrar\n from ens import ENS\n from web3 import IPCProvider \n\n ns = ENS(IPCProvider('/your/custom/ipc/path'))\n reg = Registrar(ns)\n\nDeveloper Setup\n---------------\n\n::\n\n git clone git@github.com:carver/ensauction.py.git\n cd ensauction.py/\n\n python3 -m venv venv\n . venv/bin/activate\n\n pip install -e .\n pip install -r requirements-dev.txt\n\nTesting Setup\n~~~~~~~~~~~~~\n\nRe-run flake on file changes:\n\n::\n\n $ when-changed -s -1 -r ensauction/ tests/ -c \"clear; echo; echo \\\"running flake - $(date)\\\"; warn()\n {\n notify-send -t 5000 'Flake8 failure \u26a0\u26a0\u26a0\u26a0\u26a0' 'flake8 on ensauction.py failed'\n }\n if ! git diff | flake8 --diff | grep \"\\.py\"; then if ! flake8 ensauction/ tests/; then warn; fi else warn; fi; echo done\"\n\nWhy does ensauction.py require python 3?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*Short version*\n\nIt turns out that the distinction between ``str`` and ``bytes`` is\nimportant. If you want to write code for the future (Ethereum), don't\nuse a language from the past.\n\n*Long version*\n\nInteracting with the EVM requires clarity on the bits you're using. For\nexample, a sha3 hash expects to receive a series of bytes to process.\nCalculating the sha3 hash of a string is (or should be) a Type Error;\nthe hash algorithm doesn't know what to do with a series of characters,\naka Unicode code points. As the caller, you need to know which thing\nyou're calculating the hash of: 1. a series of bytes:\n``b'[ c$o!\\x91\\xf1\\x8f&u\\xce\\xdb\\x8b(\\x10.\\x95tX'`` 2. the bytes\nrepresented by a string in hex format:\n``'0x5b2063246f2191f18f2675cedb8b28102e957458'`` 3. the bytes generated\nby encoding a string using utf-8: **Oops, the bytes from #1 cannot be\nread using utf-8!** 4. the bytes generated by encoding a string using\nutf-16: ``'\u205b\u2463\u216f\\uf191\u268f\uce75\u8bdb\u1028\u952e\u5874'``\n\nPython 3 doesn't let you ignore a lot of these details. That's good,\nbecause precision in dealing with the EVM is critical.\n\nIf you are resistant -- I get it, I've been there. It is not intuitive\nfor most people. But it's seriously worth it to `learn about\nencoding `__\nif you're going to develop on top of Ethereum. Your ETH depends on it!\n\nRelease setup\n~~~~~~~~~~~~~\n\nFor Debian-like systems:\n\n::\n\n apt install pandoc\n\nTo release a new version:\n\n.. code:: sh\n\n make release bump=$$VERSION_PART_TO_BUMP$$\n\nHow to bumpversion\n^^^^^^^^^^^^^^^^^^\n\nThe version format for this repo is ``{major}.{minor}.{patch}`` for\nstable, and ``{major}.{minor}.{patch}-{stage}.{devnum}`` for unstable\n(``stage`` can be alpha or beta).\n\nTo issue the next version in line, specify which part to bump, like\n``make release bump=minor`` or ``make release bump=devnum``.\n\nIf you are in a beta version, ``make release bump=stage`` will switch to\na stable.\n\nTo issue an unstable version when the current version is stable, specify\nthe new version explicitly, like\n``make release bump=\"--new-version 4.0.0-alpha.1 devnum\"``\n\n.. |Join the chat at https://gitter.im/ens-py/Lobby| image:: https://badges.gitter.im/ens-py/Lobby.svg\n :target: https://gitter.im/ens-py/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/carver/ensauction.py", "keywords": "ethereum eth web3 web3.py ENS", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ensauction", "package_url": "https://pypi.org/project/ensauction/", "platform": "", "project_url": "https://pypi.org/project/ensauction/", "project_urls": { "Homepage": "https://github.com/carver/ensauction.py" }, "release_url": "https://pypi.org/project/ensauction/0.1.0b0/", "requires_dist": [ "web3 (>=4.0.0)", "bumpversion (<1,>=0.5.3); extra == 'dev'", "pytest-xdist; extra == 'dev'", "pytest-watch (<5,>=4.1.0); extra == 'dev'", "wheel; extra == 'dev'", "ipython; extra == 'dev'", "pytest (<4,>=3.8.0); extra == 'dev'", "pytest-mock; extra == 'dev'", "web3[tester] (<5,>=4); extra == 'dev'", "flake8 (<4,>3); extra == 'dev'", "flake8 (<4,>3); extra == 'lint'", "pytest (<4,>=3.8.0); extra == 'test'", "pytest-mock; extra == 'test'", "web3[tester] (<5,>=4); extra == 'test'" ], "requires_python": ">=3.5", "summary": "Ethereum Name Service Auction, in Python", "version": "0.1.0b0" }, "last_serial": 4281112, "releases": { "0.1.0a1": [ { "comment_text": "", "digests": { "md5": "b5d2c53249b4b76b94a4b51708641687", "sha256": "dbd1ae987b97f28524463b02db605e539a02e47bf14a45aee44f91030742bfe5" }, "downloads": -1, "filename": "ensauction-0.1.0a1-py3-none-any.whl", "has_sig": false, "md5_digest": "b5d2c53249b4b76b94a4b51708641687", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10972, "upload_time": "2018-09-17T22:05:33", "url": "https://files.pythonhosted.org/packages/ca/ef/f8e2e950a2d2c9440514693c573c2b1dfc889fe37ea5313818c5b293e996/ensauction-0.1.0a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24ba84b78b6e81564a48df55abcc6f52", "sha256": "046fe4c4d04690ace0da3c0ac7681ee2ff4f79282a6ca7579b99875cd8a67a06" }, "downloads": -1, "filename": "ensauction-0.1.0a1.tar.gz", "has_sig": false, "md5_digest": "24ba84b78b6e81564a48df55abcc6f52", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11612, "upload_time": "2018-09-17T22:05:32", "url": "https://files.pythonhosted.org/packages/2e/10/13d71c24a7f44a8b2339e91163716a596b50a58c3d981cfed12a94328d28/ensauction-0.1.0a1.tar.gz" } ], "0.1.0b0": [ { "comment_text": "", "digests": { "md5": "09ceb65f928bc56c0eabf96cf83703a0", "sha256": "e8b13aae4e89d988648e4d6d45eae6e1d63bd49e62c40fd150fb88ca56636cf0" }, "downloads": -1, "filename": "ensauction-0.1.0b0-py3-none-any.whl", "has_sig": false, "md5_digest": "09ceb65f928bc56c0eabf96cf83703a0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 10972, "upload_time": "2018-09-17T22:17:52", "url": "https://files.pythonhosted.org/packages/d1/29/1195f55fe10282b2c7f5b2b8bf3ab9db8fe07be8703383938e87223a0e05/ensauction-0.1.0b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58ce82bd25618dd96cdb486c4c26ce61", "sha256": "f2835082a18d3966e65290772987e6c4971cc6f5f281247e375966cc2510b939" }, "downloads": -1, "filename": "ensauction-0.1.0b0.tar.gz", "has_sig": false, "md5_digest": "58ce82bd25618dd96cdb486c4c26ce61", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 11610, "upload_time": "2018-09-17T22:17:53", "url": "https://files.pythonhosted.org/packages/ce/87/3e1b2d53d569ec3e15c50ffb39e82a0ac6ec0d6d52893cab3d25cce011da/ensauction-0.1.0b0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "09ceb65f928bc56c0eabf96cf83703a0", "sha256": "e8b13aae4e89d988648e4d6d45eae6e1d63bd49e62c40fd150fb88ca56636cf0" }, "downloads": -1, "filename": "ensauction-0.1.0b0-py3-none-any.whl", "has_sig": false, "md5_digest": "09ceb65f928bc56c0eabf96cf83703a0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 10972, "upload_time": "2018-09-17T22:17:52", "url": "https://files.pythonhosted.org/packages/d1/29/1195f55fe10282b2c7f5b2b8bf3ab9db8fe07be8703383938e87223a0e05/ensauction-0.1.0b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58ce82bd25618dd96cdb486c4c26ce61", "sha256": "f2835082a18d3966e65290772987e6c4971cc6f5f281247e375966cc2510b939" }, "downloads": -1, "filename": "ensauction-0.1.0b0.tar.gz", "has_sig": false, "md5_digest": "58ce82bd25618dd96cdb486c4c26ce61", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 11610, "upload_time": "2018-09-17T22:17:53", "url": "https://files.pythonhosted.org/packages/ce/87/3e1b2d53d569ec3e15c50ffb39e82a0ac6ec0d6d52893cab3d25cce011da/ensauction-0.1.0b0.tar.gz" } ] }