Name | nectarengine JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | command line tool and python library for sending hive engine tokens |
upload_time | 2025-07-14 15:05:44 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License |
keywords |
hive
nft
tools
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# nectarengine
Python tools for obtaining and processing hive engine tokens
[](https://pypi.python.org/pypi/nectarengine/)
[](https://pypi.python.org/pypi/nectarengine/)
## Installation
```bash
pip install nectarengine
```
## Commands
Get the latest block of the sidechain
```python
from nectarengine.api import Api
api = Api()
print(api.get_latest_block_info())
```
Get the block with the specified block number of the sidechain
```python
from nectarengine.api import Api
api = Api()
print(api.get_block_info(1910))
```
Retrieve the specified transaction info of the sidechain
```python
from nectarengine.api import Api
api = Api()
print(api.get_transaction_info("e6c7f351b3743d1ed3d66eb9c6f2c102020aaa5d"))
```
Get the contract specified from the database
```python
from nectarengine.api import Api
api = Api()
print(api.get_contract("tokens"))
```
Get an array of objects that match the query from the table of the specified contract
```python
from nectarengine.api import Api
api = Api()
print(api.find("tokens", "tokens"))
```
Get the object that matches the query from the table of the specified contract
```python
from nectarengine.api import Api
api = Api()
print(api.find_one("tokens", "tokens"))
```
Get the transaction history for an account and a token
```python
from nectarengine.api import Api
api = Api()
print(api.get_history("thecrazygm", "INCOME"))
```
## Token transfer
```python
from nectar import Hive
from nectarengine.wallet import Wallet
hv = Hive(keys=["5xx"])
wallet = Wallet("test_user", blockchain_instance=hv)
wallet.transfer("test1",1,"TST", memo="This is a test")
```
## Buy/Sell
### Create a buy order
```python
from nectar import Hive
from nectarengine.market import Market
hv = Hive(keys=["5xx"])
m=Market(blockchain_instance=hv)
m.buy("test_user", 1, "TST", 9.99)
```
### Create a sell order
```python
from nectar import Hive
from nectarengine.market import Market
hv = Hive(keys=["5xx"])
m=Market(blockchain_instance=hv)
m.sell("test_user", 1, "TST", 9.99)
```
### Cancel a buy order
```python
from nectar import Hive
from nectarengine.market import Market
hv = Hive(keys=["5xx"])
m=Market(blockchain_instance=hv)
open_buy_orders = m.get_buy_book("TST", "test_user")
m.cancel("test_user", "buy", open_buy_orders[0]["_id"])
```
### Cancel a sell order
```python
from nectar import Hive
from nectarengine.market import Market
hv = Hive(keys=["5xx"])
m=Market(blockchain_instance=hv)
open_sell_orders = m.get_sell_book("TST", "test_user")
m.cancel("test_user", "sell", open_sell_orders[0]["_id"])
```
### Deposit Hive
```python
from nectar import Hive
from nectarengine.market import Market
hv = Hive(keys=["5xx"])
m=Market(blockchain_instance=hv)
m.deposit("test_user", 10)
```
### Withdrawal
```python
from nectar import Hive
from nectarengine.market import Market
hv = Hive(keys=["5xx"])
m=Market(blockchain_instance=hv)
m.withdraw("test_user", 10)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "nectarengine",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Michael Garcia <thecrazygm@gmail.com>",
"keywords": "hive, nft, tools",
"author": null,
"author_email": "Michael Garcia <thecrazygm@gmail.com>, Holger Nahrstaedt <nahrstaedt@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/61/b7/af75ad96ec2d9619804fa9741bb84f8b777b97159d7fa51c7078ffaffecf/nectarengine-0.1.1.tar.gz",
"platform": null,
"description": "# nectarengine\n\nPython tools for obtaining and processing hive engine tokens\n\n[](https://pypi.python.org/pypi/nectarengine/)\n\n[](https://pypi.python.org/pypi/nectarengine/)\n\n## Installation\n\n```bash\npip install nectarengine\n```\n\n## Commands\n\nGet the latest block of the sidechain\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.get_latest_block_info())\n```\n\nGet the block with the specified block number of the sidechain\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.get_block_info(1910))\n```\n\nRetrieve the specified transaction info of the sidechain\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.get_transaction_info(\"e6c7f351b3743d1ed3d66eb9c6f2c102020aaa5d\"))\n```\n\nGet the contract specified from the database\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.get_contract(\"tokens\"))\n```\n\nGet an array of objects that match the query from the table of the specified contract\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.find(\"tokens\", \"tokens\"))\n```\n\nGet the object that matches the query from the table of the specified contract\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.find_one(\"tokens\", \"tokens\"))\n```\n\nGet the transaction history for an account and a token\n\n```python\nfrom nectarengine.api import Api\napi = Api()\nprint(api.get_history(\"thecrazygm\", \"INCOME\"))\n```\n\n## Token transfer\n\n```python\nfrom nectar import Hive\nfrom nectarengine.wallet import Wallet\nhv = Hive(keys=[\"5xx\"])\nwallet = Wallet(\"test_user\", blockchain_instance=hv)\nwallet.transfer(\"test1\",1,\"TST\", memo=\"This is a test\")\n```\n\n## Buy/Sell\n\n### Create a buy order\n\n```python\nfrom nectar import Hive\nfrom nectarengine.market import Market\nhv = Hive(keys=[\"5xx\"])\nm=Market(blockchain_instance=hv)\nm.buy(\"test_user\", 1, \"TST\", 9.99)\n```\n\n### Create a sell order\n\n```python\nfrom nectar import Hive\nfrom nectarengine.market import Market\nhv = Hive(keys=[\"5xx\"])\nm=Market(blockchain_instance=hv)\nm.sell(\"test_user\", 1, \"TST\", 9.99)\n```\n\n### Cancel a buy order\n\n```python\nfrom nectar import Hive\nfrom nectarengine.market import Market\nhv = Hive(keys=[\"5xx\"])\nm=Market(blockchain_instance=hv)\nopen_buy_orders = m.get_buy_book(\"TST\", \"test_user\")\nm.cancel(\"test_user\", \"buy\", open_buy_orders[0][\"_id\"])\n```\n\n### Cancel a sell order\n\n```python\nfrom nectar import Hive\nfrom nectarengine.market import Market\nhv = Hive(keys=[\"5xx\"])\nm=Market(blockchain_instance=hv)\nopen_sell_orders = m.get_sell_book(\"TST\", \"test_user\")\nm.cancel(\"test_user\", \"sell\", open_sell_orders[0][\"_id\"])\n```\n\n### Deposit Hive\n\n```python\nfrom nectar import Hive\nfrom nectarengine.market import Market\nhv = Hive(keys=[\"5xx\"])\nm=Market(blockchain_instance=hv)\nm.deposit(\"test_user\", 10)\n```\n\n### Withdrawal\n\n```python\nfrom nectar import Hive\nfrom nectarengine.market import Market\nhv = Hive(keys=[\"5xx\"])\nm=Market(blockchain_instance=hv)\nm.withdraw(\"test_user\", 10)\n```\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "command line tool and python library for sending hive engine tokens",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/thecrazygm/nectarengine/issues",
"Documentation": "https://nectarengine.readthedocs.io",
"Homepage": "https://github.com/thecrazygm/nectarengine"
},
"split_keywords": [
"hive",
" nft",
" tools"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4586a2823aee6b92afa3de10d4331571e9eafc495bbe1de2401afd2ee42f6a54",
"md5": "47c1518d2689c4e0a210427bf733aff4",
"sha256": "3fda78336dea1a06f2798ebfd3700bc7fc1ec511946d99ac23a870d0e737f928"
},
"downloads": -1,
"filename": "nectarengine-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "47c1518d2689c4e0a210427bf733aff4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 36858,
"upload_time": "2025-07-14T15:05:43",
"upload_time_iso_8601": "2025-07-14T15:05:43.330101Z",
"url": "https://files.pythonhosted.org/packages/45/86/a2823aee6b92afa3de10d4331571e9eafc495bbe1de2401afd2ee42f6a54/nectarengine-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "61b7af75ad96ec2d9619804fa9741bb84f8b777b97159d7fa51c7078ffaffecf",
"md5": "c3cbbc2d121be5f0d2dd85a4ff0c54f4",
"sha256": "6a4bf9585ee7ce07d49d61a119a40167d67d5bec30b963574c13a486dec68a40"
},
"downloads": -1,
"filename": "nectarengine-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "c3cbbc2d121be5f0d2dd85a4ff0c54f4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 75916,
"upload_time": "2025-07-14T15:05:44",
"upload_time_iso_8601": "2025-07-14T15:05:44.238217Z",
"url": "https://files.pythonhosted.org/packages/61/b7/af75ad96ec2d9619804fa9741bb84f8b777b97159d7fa51c7078ffaffecf/nectarengine-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 15:05:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thecrazygm",
"github_project": "nectarengine",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "nectarengine"
}