-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
134 lines (95 loc) · 3.15 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
from setuptools import setup
setup(
name="blockchain_lab",
version="0.9.0",
description="""A fully functional blockchain lab.""",
long_description="""
# Blockchain Lab | [](https://colab.research.google.com/github/Naruno/Blockchain-Lab/blob/master/blockchain_lab.ipynb) [](https://ssh.cloud.google.com/cloudshell/open?shellonly=true&cloudshell_git_repo=https://github.com/Naruno/Blockchain-Lab&cloudshell_tutorial=blockchain_lab.md)
A fully functional blockchain lab.
# Install
```
pip3 install blockchain_lab
```
# Using
## In another script
You can give these parameters in blockchain_lab()
- Node number with "node_number"
- Security circle number with "security_circle_number"
- Path with "path"
### Docker | Create & Delete
```python
from blockchain_lab import blockchain_lab
blockchain_lab().create_docker()
```
```python
from blockchain_lab import blockchain_lab
blockchain_lab().delete_docker()
```
### Local | Create & Delete
```python
from blockchain_lab import blockchain_lab
blockchain_lab().create_local()
```
```python
from blockchain_lab import blockchain_lab
blockchain_lab().delete_local()
```
### Status
```python
from blockchain_lab import blockchain_lab
blockchain_lab.status()
```
### Test with a transaction
```python
from blockchain_lab import blockchain_lab
blockchain_lab.send_transaction(receiver = "naruno", amount = 5000, data = "blockchain-lab")
```
## In command line
You can give these parameters in command line arguments of
create and delete functions.
- Node number with "-nn" or "--nodenumber"
- Security circle number with "-scn" or "--securitycirclenumber"
- Path with "-p" or "--path"
### Docker | Create & Delete
```console
blockchain_lab_create_docker
```
```console
blockchain_lab_delete_docker
```
### Local | Create & Delete
```console
blockchain_lab_create_local
```
```console
blockchain_lab_delete_local
```
### Status
```console
blockchain_lab_status
```
### Test with a transaction
```console
blockchain_lab_send_transaction -r naruno -a 5000 -d blockchain-lab
```
""",
long_description_content_type="text/markdown",
url="https://github.com/Naruno/Blockchain-Lab",
author="Naruno Developers",
author_email="[email protected]",
license="MPL-2.0",
packages=["blockchain_lab"],
package_dir={"": "src"},
entry_points={
"console_scripts": [
"blockchain_lab_create_docker=blockchain_lab.blockchain_lab:blockchain_lab_create_docker",
"blockchain_lab_create_local=blockchain_lab.blockchain_lab:blockchain_lab_create_local",
"blockchain_lab_delete_docker=blockchain_lab.blockchain_lab:blockchain_lab_delete_docker",
"blockchain_lab_delete_local=blockchain_lab.blockchain_lab:blockchain_lab_delete_local",
"blockchain_lab_status=blockchain_lab.blockchain_lab:blockchain_lab_status",
"blockchain_lab_send_transaction=blockchain_lab.blockchain_lab:blockchain_lab_send_transaction",
],
},
python_requires=">=3.7",
zip_safe=False,
)