You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to extend our Python library or if you find a bug, please open a PR!
5
+
6
+
Also be sure to test your code the `unittest` command at the `/root` level directory.
7
+
8
+
Run tests:
9
+
10
+
```bash
11
+
python -m unittest
12
+
```
13
+
14
+
When creating new functions, please follow the [Google style Python docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). See example below:
[Roboflow](https://roboflow.com) provides everything you need to build and deploy computer vision models. `roboflow-python` is the official Roboflow Python package. `roboflow-python` enables you to interact with models, datasets, and projects hosted on Roboflow.
To install this package, please use `Python 3.6` or higher.
65
-
66
-
Install from PyPi (Recommended):
8
+
With this Python package, you can:
9
+
10
+
1. Create and manage projects;
11
+
2. Upload images, annotations, and datasets to manage in Roboflow;
12
+
3. Start training vision models on Robfolow;
13
+
4. Run inference on models hosted on Roboflow, or Roboflow models self-hosted via [Roboflow Inference](https://github.com/roboflow/inference), and more.
14
+
15
+
## 💻 Installation
16
+
17
+
You will need to have `Python 3.6` or higher set up to use the Roboflow Python package.
18
+
19
+
Run the following command to install the Roboflow Python package:
To use the Roboflow Python package, you first need to authenticate with your Roboflow account. You can do this by running the following command:
83
42
84
43
```python
85
44
import roboflow
86
45
roboflow.login()
87
46
```
88
47
89
-
## Quickstart
48
+
<details>
49
+
<summary>Authenticate with an API key</summary>
50
+
51
+
You can also authenticate with an API key by using the following code:
52
+
53
+
```python
54
+
import roboflow
55
+
56
+
rf = roboflow.Roboflow(api_key="")
57
+
```
58
+
59
+
[Learn how to retrieve your Roboflow API key](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key).
60
+
61
+
</details>
90
62
91
63
### Datasets
92
64
93
65
Download any of over 200,000 public computer vision datasets from [Roboflow Universe](universe.roboflow.com). Label and download your own datasets on app.roboflow.com.
The Roboflow python library is structured by the core Roboflow application objects.
86
+
The Roboflow Python library is structured by the core Roboflow application objects.
118
87
119
88
Workspace (workspace.py) --> Project (project.py) --> Version (version.py)
120
89
121
90
```python
122
-
from roboflow import Roboflow
123
-
rf = Roboflow()
91
+
import roboflow
92
+
93
+
roboflow.login()
94
+
95
+
rf = roboflow.Roboflow()
96
+
124
97
workspace = rf.workspace("WORKSPACE_URL")
125
98
project = workspace.project("PROJECT_URL")
126
99
version = project.version("VERSION_NUMBER")
@@ -134,42 +107,52 @@ Within the project object, you can retrieve metadata about the project, list ver
134
107
135
108
Within the version object, you can download the dataset version in any model format, train the version on Roboflow, and deploy your own external model to Roboflow.
136
109
137
-
## Contributing
138
-
139
-
If you want to extend our Python library or if you find a bug, please open a PR!
140
-
141
-
Also be sure to test your code the `unittest` command at the `/root` level directory.
142
-
143
-
Run tests:
144
-
145
-
```bash
146
-
python -m unittest
147
-
```
148
-
149
-
When creating new functions, please follow the [Google style Python docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). See example below:
The return value. True for success, False otherwise.
161
-
162
-
"""
163
-
```
164
-
165
-
We provide a `Makefile` to format and ensure code quality. **Be sure to run them before creating a PR**.
166
-
167
-
```bash
168
-
# format code with `black` and `isort`
169
-
make style
170
-
171
-
# check code with flake8
172
-
make check_code_quality
173
-
```
174
-
175
-
**Note** These tests will be run automatically when you commit thanks to git hooks.
110
+
## 🏆 Contributing
111
+
112
+
We would love your input on how we can improve the Roboflow Python package! Please see our [contributing guide](https://github.com/roboflow/roboflow-python) to get started. Thank you 🙏 to all our contributors!
0 commit comments