bittensor-cli 8.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. bittensor-cli-8.0.0/PKG-INFO +170 -0
  2. bittensor-cli-8.0.0/README.md +143 -0
  3. bittensor-cli-8.0.0/bittensor_cli/__init__.py +23 -0
  4. bittensor-cli-8.0.0/bittensor_cli/cli.py +4240 -0
  5. bittensor-cli-8.0.0/bittensor_cli/doc_generation_helper.py +4 -0
  6. bittensor-cli-8.0.0/bittensor_cli/src/__init__.py +374 -0
  7. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/__init__.py +0 -0
  8. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/async_substrate_interface.py +2749 -0
  9. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/balances.py +281 -0
  10. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/chain_data.py +732 -0
  11. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/extrinsics/__init__.py +0 -0
  12. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/extrinsics/registration.py +1662 -0
  13. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/extrinsics/root.py +498 -0
  14. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/extrinsics/transfer.py +187 -0
  15. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/minigraph.py +216 -0
  16. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/networking.py +12 -0
  17. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/subtensor_interface.py +1067 -0
  18. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/templates/table.j2 +267 -0
  19. bittensor-cli-8.0.0/bittensor_cli/src/bittensor/utils.py +861 -0
  20. bittensor-cli-8.0.0/bittensor_cli/src/commands/__init__.py +0 -0
  21. bittensor-cli-8.0.0/bittensor_cli/src/commands/root.py +1744 -0
  22. bittensor-cli-8.0.0/bittensor_cli/src/commands/stake/__init__.py +0 -0
  23. bittensor-cli-8.0.0/bittensor_cli/src/commands/stake/children_hotkeys.py +767 -0
  24. bittensor-cli-8.0.0/bittensor_cli/src/commands/stake/stake.py +1474 -0
  25. bittensor-cli-8.0.0/bittensor_cli/src/commands/subnets.py +901 -0
  26. bittensor-cli-8.0.0/bittensor_cli/src/commands/sudo.py +235 -0
  27. bittensor-cli-8.0.0/bittensor_cli/src/commands/wallets.py +1672 -0
  28. bittensor-cli-8.0.0/bittensor_cli/src/commands/weights.py +438 -0
  29. bittensor-cli-8.0.0/bittensor_cli.egg-info/PKG-INFO +170 -0
  30. bittensor-cli-8.0.0/bittensor_cli.egg-info/SOURCES.txt +34 -0
  31. bittensor-cli-8.0.0/bittensor_cli.egg-info/dependency_links.txt +1 -0
  32. bittensor-cli-8.0.0/bittensor_cli.egg-info/entry_points.txt +2 -0
  33. bittensor-cli-8.0.0/bittensor_cli.egg-info/requires.txt +24 -0
  34. bittensor-cli-8.0.0/bittensor_cli.egg-info/top_level.txt +1 -0
  35. bittensor-cli-8.0.0/setup.cfg +4 -0
  36. bittensor-cli-8.0.0/setup.py +101 -0
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.1
2
+ Name: bittensor-cli
3
+ Version: 8.0.0
4
+ Summary: Bittensor CLI
5
+ Home-page: https://github.com/opentensor/btcli
6
+ Author: bittensor.com
7
+ Author-email:
8
+ License: MIT
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Software Development :: Build Tools
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Software Development :: Libraries
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ Provides-Extra: cuda
27
+
28
+ <div align="center">
29
+
30
+ # Bittensor CLI <!-- omit in toc -->
31
+ [![Discord Chat](https://img.shields.io/discord/308323056592486420.svg)](https://discord.gg/bittensor)
32
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
33
+ <!-- [![PyPI version](https://badge.fury.io/py/bittensor_cli.svg)](https://badge.fury.io/py/bittensor_cli) -->
34
+
35
+ ---
36
+
37
+ ## Internet-scale Neural Networks <!-- omit in toc -->
38
+
39
+ [SDK](https://github.com/opentensor/bittensor/tree/master) • [Wallet](https://github.com/opentensor/btwallet) • [Research](https://bittensor.com/whitepaper)
40
+
41
+ </div>
42
+
43
+ - [Documentation](#documentation)
44
+ - [Install on macOS and Linux](#install-on-macos-and-linux)
45
+ - [Install from source](#install-from-source)
46
+ - [Install on Windows](#install-on-windows)
47
+ - [Verify the installation](#verify-the-installation)
48
+ - [Configuration](#configuration)
49
+ - [Example config file](#example-config-file)
50
+ - [License](#license)
51
+
52
+ ---
53
+
54
+ The Bittensor CLI, `btcli`, is a powerful command line tool for the Bittensor platform. You can use it on any macOS, Linux or WSL terminal to manage all common operations like creating a wallet, registering a subnet or a neuron, delegating your TAO, viewing Senate proposals and voting for them, and much more. Help information can be invoked for every command and option with `--help` option.
55
+
56
+ ![btcli screenshot](./assets/btcli-screenshot.png)
57
+
58
+ ---
59
+
60
+ ## Documentation
61
+
62
+ Installation steps are described below. For a full documentation on how to use `btcli`, see the [Bittensor CLI section](https://docs.bittensor.com/btcli) on the developer documentation site.
63
+
64
+ ---
65
+
66
+ ## Install on macOS and Linux
67
+
68
+ You can install `btcli` on your local machine directly from source. **Make sure you verify your installation after you install**:
69
+
70
+ ### Install from source
71
+
72
+ 1. Create and activate a virtual environment.
73
+
74
+ ```bash
75
+ python3 -m venv btcli_venv
76
+ source btcli_venv/bin/activate
77
+ ```
78
+
79
+ 2. Clone the Bittensor CLI repo.
80
+
81
+ ```bash
82
+ git clone https://github.com/opentensor/btcli.git
83
+ ```
84
+
85
+ 3. `cd` into `btcli` directory.
86
+
87
+ ```bash
88
+ cd btcli
89
+ ```
90
+
91
+ 4. Install
92
+
93
+
94
+ ```bash
95
+ pip3 install .
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Install on Windows
101
+
102
+ To install and run Bittensor SDK on Windows you must install [**WSL 2** (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/about) on Windows and select [Ubuntu Linux distribution](https://github.com/ubuntu/WSL/blob/main/docs/guides/install-ubuntu-wsl2.md).
103
+
104
+ After you installed the above, follow the same installation steps described above in [Install on macOS and Linux](#install-on-macos-and-linux).
105
+
106
+ **ALERT**: **Limited support on Windows for Bittensor operations**
107
+ While wallet transactions like delegating, transfer, registering, staking can be performed on a Windows machine using WSL 2, the subnet mining and subnet validating operations are not recommended and are not supported on Windows machines.
108
+
109
+ ---
110
+
111
+ ## Verify the installation
112
+
113
+ ```bash
114
+ btcli --version
115
+ ```
116
+
117
+ The above command will show you the version of the `btcli` you just installed.
118
+
119
+ ---
120
+
121
+ ## Configuration
122
+
123
+ You can set the commonly used values, such as your hotkey and coldkey names, the default chain URL or the network name you use, and more, in `config.yml`. You can override these values by explicitly passing them in the command line for any `btcli` command.
124
+
125
+ ### Example config file
126
+
127
+ The default location of the config file is: `~/.bittensor/config.yml`. An example of a `config.yml` is shown below:
128
+
129
+ ```yaml
130
+ chain: ws://127.0.0.1:9945
131
+ network: local
132
+ no_cache: False
133
+ wallet_hotkey: hotkey-user1
134
+ wallet_name: coldkey-user1
135
+ wallet_path: ~/.bittensor/wallets
136
+ metagraph_cols:
137
+ ACTIVE: true
138
+ AXON: true
139
+ COLDKEY: true
140
+ CONSENSUS: true
141
+ DIVIDENDS: true
142
+ EMISSION: true
143
+ HOTKEY: true
144
+ INCENTIVE: true
145
+ RANK: true
146
+ STAKE: true
147
+ TRUST: true
148
+ UID: true
149
+ UPDATED: true
150
+ VAL: true
151
+ VTRUST: true
152
+ ```
153
+
154
+ **For more help:**
155
+
156
+ ```bash
157
+ btcli config --help
158
+ ```
159
+
160
+ ---
161
+
162
+ ## License
163
+ The MIT License (MIT)
164
+ Copyright © 2024 The Opentensor Foundation
165
+
166
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
167
+
168
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
169
+
170
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,143 @@
1
+ <div align="center">
2
+
3
+ # Bittensor CLI <!-- omit in toc -->
4
+ [![Discord Chat](https://img.shields.io/discord/308323056592486420.svg)](https://discord.gg/bittensor)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ <!-- [![PyPI version](https://badge.fury.io/py/bittensor_cli.svg)](https://badge.fury.io/py/bittensor_cli) -->
7
+
8
+ ---
9
+
10
+ ## Internet-scale Neural Networks <!-- omit in toc -->
11
+
12
+ [SDK](https://github.com/opentensor/bittensor/tree/master) • [Wallet](https://github.com/opentensor/btwallet) • [Research](https://bittensor.com/whitepaper)
13
+
14
+ </div>
15
+
16
+ - [Documentation](#documentation)
17
+ - [Install on macOS and Linux](#install-on-macos-and-linux)
18
+ - [Install from source](#install-from-source)
19
+ - [Install on Windows](#install-on-windows)
20
+ - [Verify the installation](#verify-the-installation)
21
+ - [Configuration](#configuration)
22
+ - [Example config file](#example-config-file)
23
+ - [License](#license)
24
+
25
+ ---
26
+
27
+ The Bittensor CLI, `btcli`, is a powerful command line tool for the Bittensor platform. You can use it on any macOS, Linux or WSL terminal to manage all common operations like creating a wallet, registering a subnet or a neuron, delegating your TAO, viewing Senate proposals and voting for them, and much more. Help information can be invoked for every command and option with `--help` option.
28
+
29
+ ![btcli screenshot](./assets/btcli-screenshot.png)
30
+
31
+ ---
32
+
33
+ ## Documentation
34
+
35
+ Installation steps are described below. For a full documentation on how to use `btcli`, see the [Bittensor CLI section](https://docs.bittensor.com/btcli) on the developer documentation site.
36
+
37
+ ---
38
+
39
+ ## Install on macOS and Linux
40
+
41
+ You can install `btcli` on your local machine directly from source. **Make sure you verify your installation after you install**:
42
+
43
+ ### Install from source
44
+
45
+ 1. Create and activate a virtual environment.
46
+
47
+ ```bash
48
+ python3 -m venv btcli_venv
49
+ source btcli_venv/bin/activate
50
+ ```
51
+
52
+ 2. Clone the Bittensor CLI repo.
53
+
54
+ ```bash
55
+ git clone https://github.com/opentensor/btcli.git
56
+ ```
57
+
58
+ 3. `cd` into `btcli` directory.
59
+
60
+ ```bash
61
+ cd btcli
62
+ ```
63
+
64
+ 4. Install
65
+
66
+
67
+ ```bash
68
+ pip3 install .
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Install on Windows
74
+
75
+ To install and run Bittensor SDK on Windows you must install [**WSL 2** (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/about) on Windows and select [Ubuntu Linux distribution](https://github.com/ubuntu/WSL/blob/main/docs/guides/install-ubuntu-wsl2.md).
76
+
77
+ After you installed the above, follow the same installation steps described above in [Install on macOS and Linux](#install-on-macos-and-linux).
78
+
79
+ **ALERT**: **Limited support on Windows for Bittensor operations**
80
+ While wallet transactions like delegating, transfer, registering, staking can be performed on a Windows machine using WSL 2, the subnet mining and subnet validating operations are not recommended and are not supported on Windows machines.
81
+
82
+ ---
83
+
84
+ ## Verify the installation
85
+
86
+ ```bash
87
+ btcli --version
88
+ ```
89
+
90
+ The above command will show you the version of the `btcli` you just installed.
91
+
92
+ ---
93
+
94
+ ## Configuration
95
+
96
+ You can set the commonly used values, such as your hotkey and coldkey names, the default chain URL or the network name you use, and more, in `config.yml`. You can override these values by explicitly passing them in the command line for any `btcli` command.
97
+
98
+ ### Example config file
99
+
100
+ The default location of the config file is: `~/.bittensor/config.yml`. An example of a `config.yml` is shown below:
101
+
102
+ ```yaml
103
+ chain: ws://127.0.0.1:9945
104
+ network: local
105
+ no_cache: False
106
+ wallet_hotkey: hotkey-user1
107
+ wallet_name: coldkey-user1
108
+ wallet_path: ~/.bittensor/wallets
109
+ metagraph_cols:
110
+ ACTIVE: true
111
+ AXON: true
112
+ COLDKEY: true
113
+ CONSENSUS: true
114
+ DIVIDENDS: true
115
+ EMISSION: true
116
+ HOTKEY: true
117
+ INCENTIVE: true
118
+ RANK: true
119
+ STAKE: true
120
+ TRUST: true
121
+ UID: true
122
+ UPDATED: true
123
+ VAL: true
124
+ VTRUST: true
125
+ ```
126
+
127
+ **For more help:**
128
+
129
+ ```bash
130
+ btcli config --help
131
+ ```
132
+
133
+ ---
134
+
135
+ ## License
136
+ The MIT License (MIT)
137
+ Copyright © 2024 The Opentensor Foundation
138
+
139
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
140
+
141
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
142
+
143
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,23 @@
1
+ # The MIT License (MIT)
2
+ # Copyright © 2024 Opentensor Foundation
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
5
+ # documentation files (the “Software”), to deal in the Software without restriction, including without limitation
6
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7
+ # and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+ #
9
+ # The above copyright notice and this permission notice shall be included in all copies or substantial portions of
10
+ # the Software.
11
+ #
12
+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
13
+ # THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
14
+ # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
16
+ # DEALINGS IN THE SOFTWARE.
17
+
18
+ from .cli import CLIManager
19
+
20
+
21
+ __version__ = "0.1.0"
22
+
23
+ __all__ = ["CLIManager", "__version__"]