{ "info": { "author": "Alexander Polishchuk", "author_email": "apolishchuk52@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Django cryptocurrency framework\n\n[![Build Status](https://travis-ci.org/HelloCreepy/django-cryptocurrency-framework.svg?branch=master)](https://travis-ci.org/HelloCreepy/django-cryptocurrency-framework)\n\n## Introduction\nThe Django application that can halp to implement payments receiving in cryptocurrency. \n\nThe project is now under active development. But in this moment it can much facilitate in the task of creation bitcoin wallet or other app that use bitcoin payments. \n\n## Requirements\n- [bitcoin-core](https://bitcoincore.org/en/download/)\n- job scheduler or queue to your taste\n\n\n## Installation\n```bash\ngit clone git@github.com:HelloCreepy/django-cryptocurrency-framework.git\ncd django-cryptocurrency-framework\npip install .\n```\n\n## Example \nFirst of all you need to install `bitcoin-core` and to allow RPC access. \n\nNext add a reference in your project settings and set up timeout for `bitcoin-core` node response.\n```python\nINSTALLED_APPS = [\n ...\n 'cryptocurrency.blockchains'\n]\n\n...\n\n# Cryptocurrency framework setting \nCC_FRAMEWORK = {\n 'NODE_TIMEOUT': 5,\n}\n```\n\nThen create a `Currency` and `Node` objects.\n```python\n>>> from cryptocurrency.blockchains import models\n>>> currency = models.Currency.objects.create(\n... name='BTC', \n... min_confirmations=2,\n)\n>>> models.Node.objects.create(\n... name='bitcoin-core',\n... currency=currency,\n... rpc_username='username',\n... rpc_password='password',\n... rpc_host='127.0.0.1',\n... rpc_port=18332,\n... )\n\n```\n\nIt's worth clarifying, that you can't create 'Node' or 'Currency' object if framework doesn't support corresponded cryptocurrency or node. To discover supported things you can to execute code below.\n```python\n>>> from cryptocurrency.blockchains import connectors \n>>> connectors.registry.available_currencies\n{'BTC'}\n>>> connectors.registry.available_nodes\n{'bitcoin-core'}\n```\n\nNow you are ready to receive payments. For fetch new transaction call `process_receipts` method or execute one managment command.\n```python\n>>> models.Node.objects.process_receipts()\n```\n```bash\n$ python manage.py process_receipts \n```\nThis method or command one fetch receive transactions from each node object and write them into database. Each trasaction will get status `tx.is_confirmed == True` if conformations number of transaction greater than `tx.node.currency.min_conformations`, in our case it's 2.\n\nYou can use any job scheduler or queue (celery, crontab, etc.) that will check your nodes as often as you want. \nExample with `Celery` you can find in this repo [example](https://github.com/HelloCreepy/django-cryptocurrency-framework/tree/master/example) dir. \n\n\n## Future features\n- connectors for: ETH, ETC, DASH, BCHABC, BCHSV, LTC and so on \n- `cryptocurrency.blockchain` app that help in implementation multi cryptocurrency wallet", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/HelloCreepy/django-cryptocurrency-framework", "keywords": "", "license": "GNU Lesser General Public License v3 or later (LGPLv3+)", "maintainer": "", "maintainer_email": "", "name": "django-cryptocurrency-framework", "package_url": "https://pypi.org/project/django-cryptocurrency-framework/", "platform": "", "project_url": "https://pypi.org/project/django-cryptocurrency-framework/", "project_urls": { "Homepage": "https://github.com/HelloCreepy/django-cryptocurrency-framework" }, "release_url": "https://pypi.org/project/django-cryptocurrency-framework/0.1/", "requires_dist": null, "requires_python": "", "summary": "A Django app for receiving payments in cryptocurrencies.", "version": "0.1" }, "last_serial": 5526577, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0289f041f6e0923ecd8406d49787660c", "sha256": "661ddf95c384f3a0e0fed6f4721863819b33d81bbc2af57049843b3f4a7c8a13" }, "downloads": -1, "filename": "django-cryptocurrency-framework-0.1.tar.gz", "has_sig": false, "md5_digest": "0289f041f6e0923ecd8406d49787660c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12223, "upload_time": "2019-07-13T10:17:45", "url": "https://files.pythonhosted.org/packages/aa/ff/da37d00ac2856314db05529831d6487adccb8b59cd54b02a8eeecf09a663/django-cryptocurrency-framework-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0289f041f6e0923ecd8406d49787660c", "sha256": "661ddf95c384f3a0e0fed6f4721863819b33d81bbc2af57049843b3f4a7c8a13" }, "downloads": -1, "filename": "django-cryptocurrency-framework-0.1.tar.gz", "has_sig": false, "md5_digest": "0289f041f6e0923ecd8406d49787660c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12223, "upload_time": "2019-07-13T10:17:45", "url": "https://files.pythonhosted.org/packages/aa/ff/da37d00ac2856314db05529831d6487adccb8b59cd54b02a8eeecf09a663/django-cryptocurrency-framework-0.1.tar.gz" } ] }