roboflow-slim 1.3.3__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 (114) hide show
  1. roboflow_slim-1.3.3/LICENSE +201 -0
  2. roboflow_slim-1.3.3/PKG-INFO +299 -0
  3. roboflow_slim-1.3.3/README.md +252 -0
  4. roboflow_slim-1.3.3/pyproject.toml +122 -0
  5. roboflow_slim-1.3.3/roboflow/__init__.py +285 -0
  6. roboflow_slim-1.3.3/roboflow/adapters/__init__.py +0 -0
  7. roboflow_slim-1.3.3/roboflow/adapters/deploymentapi.py +119 -0
  8. roboflow_slim-1.3.3/roboflow/adapters/rfapi.py +807 -0
  9. roboflow_slim-1.3.3/roboflow/adapters/vision_events_api.py +260 -0
  10. roboflow_slim-1.3.3/roboflow/cli/__init__.py +402 -0
  11. roboflow_slim-1.3.3/roboflow/cli/_compat.py +79 -0
  12. roboflow_slim-1.3.3/roboflow/cli/_output.py +193 -0
  13. roboflow_slim-1.3.3/roboflow/cli/_resolver.py +137 -0
  14. roboflow_slim-1.3.3/roboflow/cli/_table.py +79 -0
  15. roboflow_slim-1.3.3/roboflow/cli/handlers/__init__.py +8 -0
  16. roboflow_slim-1.3.3/roboflow/cli/handlers/_aliases.py +191 -0
  17. roboflow_slim-1.3.3/roboflow/cli/handlers/annotation.py +275 -0
  18. roboflow_slim-1.3.3/roboflow/cli/handlers/auth.py +281 -0
  19. roboflow_slim-1.3.3/roboflow/cli/handlers/batch.py +63 -0
  20. roboflow_slim-1.3.3/roboflow/cli/handlers/completion.py +65 -0
  21. roboflow_slim-1.3.3/roboflow/cli/handlers/deployment.py +305 -0
  22. roboflow_slim-1.3.3/roboflow/cli/handlers/folder.py +202 -0
  23. roboflow_slim-1.3.3/roboflow/cli/handlers/image.py +473 -0
  24. roboflow_slim-1.3.3/roboflow/cli/handlers/infer.py +117 -0
  25. roboflow_slim-1.3.3/roboflow/cli/handlers/model.py +204 -0
  26. roboflow_slim-1.3.3/roboflow/cli/handlers/project.py +200 -0
  27. roboflow_slim-1.3.3/roboflow/cli/handlers/search.py +121 -0
  28. roboflow_slim-1.3.3/roboflow/cli/handlers/train.py +204 -0
  29. roboflow_slim-1.3.3/roboflow/cli/handlers/universe.py +61 -0
  30. roboflow_slim-1.3.3/roboflow/cli/handlers/version.py +327 -0
  31. roboflow_slim-1.3.3/roboflow/cli/handlers/video.py +107 -0
  32. roboflow_slim-1.3.3/roboflow/cli/handlers/vision_events.py +441 -0
  33. roboflow_slim-1.3.3/roboflow/cli/handlers/workflow.py +405 -0
  34. roboflow_slim-1.3.3/roboflow/cli/handlers/workspace.py +240 -0
  35. roboflow_slim-1.3.3/roboflow/config.py +93 -0
  36. roboflow_slim-1.3.3/roboflow/core/__init__.py +0 -0
  37. roboflow_slim-1.3.3/roboflow/core/dataset.py +10 -0
  38. roboflow_slim-1.3.3/roboflow/core/model.py +14 -0
  39. roboflow_slim-1.3.3/roboflow/core/project.py +1043 -0
  40. roboflow_slim-1.3.3/roboflow/core/version.py +685 -0
  41. roboflow_slim-1.3.3/roboflow/core/workspace.py +1273 -0
  42. roboflow_slim-1.3.3/roboflow/deployment.py +330 -0
  43. roboflow_slim-1.3.3/roboflow/models/__init__.py +2 -0
  44. roboflow_slim-1.3.3/roboflow/models/classification.py +186 -0
  45. roboflow_slim-1.3.3/roboflow/models/clip.py +16 -0
  46. roboflow_slim-1.3.3/roboflow/models/gaze.py +17 -0
  47. roboflow_slim-1.3.3/roboflow/models/inference.py +416 -0
  48. roboflow_slim-1.3.3/roboflow/models/instance_segmentation.py +67 -0
  49. roboflow_slim-1.3.3/roboflow/models/keypoint_detection.py +192 -0
  50. roboflow_slim-1.3.3/roboflow/models/object_detection.py +551 -0
  51. roboflow_slim-1.3.3/roboflow/models/semantic_segmentation.py +50 -0
  52. roboflow_slim-1.3.3/roboflow/models/video.py +240 -0
  53. roboflow_slim-1.3.3/roboflow/roboflowpy.py +20 -0
  54. roboflow_slim-1.3.3/roboflow/util/__init__.py +0 -0
  55. roboflow_slim-1.3.3/roboflow/util/active_learning_utils.py +69 -0
  56. roboflow_slim-1.3.3/roboflow/util/annotations.py +13 -0
  57. roboflow_slim-1.3.3/roboflow/util/clip_compare_utils.py +44 -0
  58. roboflow_slim-1.3.3/roboflow/util/folderparser.py +405 -0
  59. roboflow_slim-1.3.3/roboflow/util/general.py +67 -0
  60. roboflow_slim-1.3.3/roboflow/util/image_utils.py +118 -0
  61. roboflow_slim-1.3.3/roboflow/util/model_processor.py +452 -0
  62. roboflow_slim-1.3.3/roboflow/util/prediction.py +529 -0
  63. roboflow_slim-1.3.3/roboflow/util/two_stage_utils.py +29 -0
  64. roboflow_slim-1.3.3/roboflow/util/versions.py +134 -0
  65. roboflow_slim-1.3.3/roboflow_slim.egg-info/PKG-INFO +299 -0
  66. roboflow_slim-1.3.3/roboflow_slim.egg-info/SOURCES.txt +112 -0
  67. roboflow_slim-1.3.3/roboflow_slim.egg-info/dependency_links.txt +1 -0
  68. roboflow_slim-1.3.3/roboflow_slim.egg-info/entry_points.txt +2 -0
  69. roboflow_slim-1.3.3/roboflow_slim.egg-info/requires.txt +23 -0
  70. roboflow_slim-1.3.3/roboflow_slim.egg-info/top_level.txt +2 -0
  71. roboflow_slim-1.3.3/setup.cfg +4 -0
  72. roboflow_slim-1.3.3/setup.py +56 -0
  73. roboflow_slim-1.3.3/setup_slim.py +54 -0
  74. roboflow_slim-1.3.3/tests/adapters/__init__.py +0 -0
  75. roboflow_slim-1.3.3/tests/adapters/test_rfapi_phase2.py +544 -0
  76. roboflow_slim-1.3.3/tests/cli/__init__.py +0 -0
  77. roboflow_slim-1.3.3/tests/cli/test_annotation_handler.py +255 -0
  78. roboflow_slim-1.3.3/tests/cli/test_auth.py +68 -0
  79. roboflow_slim-1.3.3/tests/cli/test_backwards_compat.py +72 -0
  80. roboflow_slim-1.3.3/tests/cli/test_batch_handler.py +38 -0
  81. roboflow_slim-1.3.3/tests/cli/test_completion_handler.py +34 -0
  82. roboflow_slim-1.3.3/tests/cli/test_deployment_handler.py +87 -0
  83. roboflow_slim-1.3.3/tests/cli/test_discovery.py +129 -0
  84. roboflow_slim-1.3.3/tests/cli/test_folder_handler.py +193 -0
  85. roboflow_slim-1.3.3/tests/cli/test_image_handler.py +329 -0
  86. roboflow_slim-1.3.3/tests/cli/test_infer_handler.py +153 -0
  87. roboflow_slim-1.3.3/tests/cli/test_model_handler.py +246 -0
  88. roboflow_slim-1.3.3/tests/cli/test_output.py +166 -0
  89. roboflow_slim-1.3.3/tests/cli/test_project_handler.py +42 -0
  90. roboflow_slim-1.3.3/tests/cli/test_search_handler.py +33 -0
  91. roboflow_slim-1.3.3/tests/cli/test_train_handler.py +147 -0
  92. roboflow_slim-1.3.3/tests/cli/test_universe_handler.py +85 -0
  93. roboflow_slim-1.3.3/tests/cli/test_version_handler.py +117 -0
  94. roboflow_slim-1.3.3/tests/cli/test_video_handler.py +64 -0
  95. roboflow_slim-1.3.3/tests/cli/test_workflow_handler.py +390 -0
  96. roboflow_slim-1.3.3/tests/cli/test_workspace.py +196 -0
  97. roboflow_slim-1.3.3/tests/models/__init__.py +0 -0
  98. roboflow_slim-1.3.3/tests/models/test_instance_segmentation.py +164 -0
  99. roboflow_slim-1.3.3/tests/models/test_keypoint_detection.py +70 -0
  100. roboflow_slim-1.3.3/tests/models/test_object_detection.py +153 -0
  101. roboflow_slim-1.3.3/tests/models/test_semantic_segmentation.py +128 -0
  102. roboflow_slim-1.3.3/tests/test_project.py +867 -0
  103. roboflow_slim-1.3.3/tests/test_queries.py +81 -0
  104. roboflow_slim-1.3.3/tests/test_rfapi.py +180 -0
  105. roboflow_slim-1.3.3/tests/test_search_export.py +101 -0
  106. roboflow_slim-1.3.3/tests/test_slim_compat.py +84 -0
  107. roboflow_slim-1.3.3/tests/test_version.py +199 -0
  108. roboflow_slim-1.3.3/tests/test_vision_events.py +636 -0
  109. roboflow_slim-1.3.3/tests/test_workspace_search.py +138 -0
  110. roboflow_slim-1.3.3/tests/util/__init__.py +0 -0
  111. roboflow_slim-1.3.3/tests/util/dummy_module/__init__.py +1 -0
  112. roboflow_slim-1.3.3/tests/util/test_folderparser.py +212 -0
  113. roboflow_slim-1.3.3/tests/util/test_image_utils.py +42 -0
  114. roboflow_slim-1.3.3/tests/util/test_versions.py +43 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2020, Roboflow
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,299 @@
1
+ Metadata-Version: 2.4
2
+ Name: roboflow-slim
3
+ Version: 1.3.3
4
+ Summary: Lightweight Roboflow SDK for vision events, workspace management, and CLI
5
+ Home-page: https://github.com/roboflow-ai/roboflow-python
6
+ Author: Roboflow
7
+ Author-email: support@roboflow.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: certifi
15
+ Requires-Dist: idna
16
+ Requires-Dist: requests
17
+ Requires-Dist: urllib3>=1.26.6
18
+ Requires-Dist: tqdm>=4.41.0
19
+ Requires-Dist: PyYAML>=5.3.1
20
+ Requires-Dist: requests_toolbelt
21
+ Requires-Dist: filetype
22
+ Requires-Dist: typer>=0.12.0
23
+ Requires-Dist: python-dateutil
24
+ Requires-Dist: python-dotenv
25
+ Requires-Dist: six
26
+ Provides-Extra: dev
27
+ Requires-Dist: mypy; extra == "dev"
28
+ Requires-Dist: responses; extra == "dev"
29
+ Requires-Dist: ruff; extra == "dev"
30
+ Requires-Dist: twine; extra == "dev"
31
+ Requires-Dist: types-pyyaml; extra == "dev"
32
+ Requires-Dist: types-requests; extra == "dev"
33
+ Requires-Dist: types-setuptools; extra == "dev"
34
+ Requires-Dist: types-tqdm; extra == "dev"
35
+ Requires-Dist: wheel; extra == "dev"
36
+ Dynamic: author
37
+ Dynamic: author-email
38
+ Dynamic: classifier
39
+ Dynamic: description
40
+ Dynamic: description-content-type
41
+ Dynamic: home-page
42
+ Dynamic: license-file
43
+ Dynamic: provides-extra
44
+ Dynamic: requires-dist
45
+ Dynamic: requires-python
46
+ Dynamic: summary
47
+
48
+ <div align="center">
49
+ <p>
50
+ <a align="center" href="" target="_blank">
51
+ <img
52
+ width="100%"
53
+ src="https://github.com/roboflow/roboflow-python/assets/37276661/528ed065-d5ac-4f9a-942e-0d211b8d97de"
54
+ >
55
+ </a>
56
+ </p>
57
+
58
+ <br>
59
+
60
+ [notebooks](https://github.com/roboflow/notebooks) | [inference](https://github.com/roboflow/inference) | [autodistill](https://github.com/autodistill/autodistill) | [collect](https://github.com/roboflow/roboflow-collect) | [supervision](https://github.com/roboflow/supervision)
61
+
62
+ <br>
63
+
64
+ [![version](https://badge.fury.io/py/roboflow.svg)](https://badge.fury.io/py/roboflow)
65
+ [![downloads](https://img.shields.io/pypi/dm/roboflow)](https://pypistats.org/packages/roboflow)
66
+ [![license](https://img.shields.io/pypi/l/roboflow)](https://github.com/roboflow/roboflow-python/blob/main/LICENSE.md)
67
+ [![python-version](https://img.shields.io/pypi/pyversions/roboflow)](https://badge.fury.io/py/roboflow)
68
+
69
+ </div>
70
+
71
+ # Roboflow Python Package
72
+
73
+ [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.
74
+
75
+ With this Python package, you can:
76
+
77
+ 1. Create and manage projects;
78
+ 2. Upload images, annotations, and datasets to manage in Roboflow;
79
+ 3. Start training vision models on Roboflow;
80
+ 4. Run inference on models hosted on Roboflow, or Roboflow models self-hosted via [Roboflow Inference](https://github.com/roboflow/inference), and more.
81
+
82
+ The Python package is documented on the [official Roboflow documentation site](https://docs.roboflow.com/api-reference/introduction). If you are developing a feature for this Python package, or need a full Python library reference, refer to the [package developer documentation](https://roboflow.github.io/roboflow-python/).
83
+
84
+ ## 💻 Installation
85
+
86
+ You will need to have `Python 3.8` or higher set up to use the Roboflow Python package.
87
+
88
+ Run the following command to install the Roboflow Python package:
89
+
90
+ ```bash
91
+ pip install roboflow
92
+ ```
93
+
94
+ For desktop features, use:
95
+
96
+ ```bash
97
+ pip install "roboflow[desktop]"
98
+ ```
99
+
100
+
101
+ <details>
102
+ <summary>Lightweight install (roboflow-slim)</summary>
103
+
104
+ If you only need vision events, workspace management, and the CLI (no image processing, inference, or training), install the lightweight package:
105
+
106
+ ```bash
107
+ pip install roboflow-slim
108
+ ```
109
+
110
+ This skips heavy dependencies like OpenCV, NumPy, Matplotlib, and Pillow, reducing install size from ~400MB to ~50MB. Useful for embedded devices, CI pipelines, and serverless environments.
111
+
112
+ Both packages share the same codebase and version. `pip install roboflow` includes everything.
113
+ </details>
114
+
115
+ <details>
116
+ <summary>Install from source</summary>
117
+
118
+ You can also install the Roboflow Python package from source using the following commands:
119
+
120
+ ```bash
121
+ git clone https://github.com/roboflow-ai/roboflow-python.git
122
+ cd roboflow-python
123
+ python3 -m venv env
124
+ source env/bin/activate
125
+ pip install .
126
+ ```
127
+ </details>
128
+
129
+ <details>
130
+ <summary>Command line tool</summary>
131
+
132
+ By installing roboflow python package you can use some of its functionality in the command line (without having to write python code).
133
+ See [CLI-COMMANDS.md](CLI-COMMANDS.md)
134
+ </details>
135
+
136
+
137
+ ## 🚀 Getting Started
138
+
139
+ To use the Roboflow Python package, you first need to authenticate with your Roboflow account. You can do this by running the following command:
140
+
141
+ ```python
142
+ import roboflow
143
+ roboflow.login()
144
+ ```
145
+
146
+ <details>
147
+ <summary>Authenticate with an API key</summary>
148
+
149
+ You can also authenticate with an API key by using the following code:
150
+
151
+ ```python
152
+ import roboflow
153
+
154
+ rf = roboflow.Roboflow(api_key="")
155
+ ```
156
+
157
+ [Learn how to retrieve your Roboflow API key](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key).
158
+
159
+ </details>
160
+
161
+ ## Quickstart
162
+
163
+ Below are some common methods used with the Roboflow Python package, presented concisely for reference. For a full library reference, refer to the [Roboflow API reference documentation](https://docs.roboflow.com/api-reference).
164
+
165
+ ```python
166
+ import roboflow
167
+
168
+ # Pass API key or use roboflow.login()
169
+ rf = roboflow.Roboflow(api_key="MY_API_KEY")
170
+
171
+ workspace = rf.workspace()
172
+
173
+ # creating object detection model that will detect flowers
174
+ project = workspace.create_project(
175
+ project_name="Flower detector",
176
+ project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation"
177
+ project_license="MIT", # "private" for private projects, only available for paid customers
178
+ annotation="flowers" # If you plan to annotate lillys, sunflowers, etc.
179
+ )
180
+
181
+ # upload a dataset
182
+ workspace.upload_dataset(
183
+ dataset_path="./dataset/",
184
+ num_workers=10,
185
+ dataset_format="yolov8", # supports yolov8, yolov5, and Pascal VOC
186
+ project_license="MIT",
187
+ project_type="object-detection"
188
+ )
189
+
190
+ version = project.version("VERSION_NUMBER")
191
+
192
+ # upload model weights - yolov10
193
+ version.deploy(model_type="yolov10", model_path=f”{HOME}/runs/detect/train/”, filename="weights.pt")
194
+
195
+ # run inference
196
+ model = version.model
197
+
198
+ img_url = "https://media.roboflow.com/quickstart/aerial_drone.jpeg"
199
+
200
+ predictions = model.predict(img_url, hosted=True).json()
201
+
202
+ print(predictions)
203
+ ```
204
+
205
+ ### Search and Export
206
+
207
+ Search for images across your workspace and export matching results as a ready-to-use dataset:
208
+
209
+ ```python
210
+ workspace = rf.workspace()
211
+
212
+ # Export images matching a search query
213
+ workspace.search_export(
214
+ query="class:person", # search query (e.g. "tag:review", "class:dog", "*")
215
+ format="coco", # annotation format: coco, yolov8, yolov5, voc, etc.
216
+ dataset="my-project", # optional: limit to a specific project
217
+ location="./my-export", # optional: output directory
218
+ )
219
+ ```
220
+
221
+ Or from the CLI:
222
+
223
+ ```bash
224
+ roboflow search-export "class:person" -f coco -d my-project -l ./my-export
225
+ ```
226
+
227
+ ## Library Structure
228
+
229
+ The Roboflow Python library is structured using the same Workspace, Project, and Version ontology that you will see in the Roboflow application.
230
+
231
+ ```python
232
+ import roboflow
233
+
234
+ roboflow.login()
235
+
236
+ rf = roboflow.Roboflow()
237
+
238
+ workspace = rf.workspace("WORKSPACE_URL")
239
+ project = workspace.project("PROJECT_URL")
240
+ version = project.version("VERSION_NUMBER")
241
+ ```
242
+
243
+ The workspace, project, and version parameters are the same as those you will find in the URL addresses at app.roboflow.com and universe.roboflow.com.
244
+
245
+ Within the workspace object you can perform actions like making a new project, listing your projects, or performing active learning where you are using predictions from one project's model to upload images to a new project.
246
+
247
+ Within the project object, you can retrieve metadata about the project, list versions, generate a new dataset version with preprocessing and augmentation settings, train a model in your project, and upload images and annotations to your project.
248
+
249
+ 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.
250
+
251
+ ## 🏆 Contributing
252
+
253
+ 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/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!
254
+
255
+ <br>
256
+
257
+ <div align="center">
258
+ <a href="https://youtube.com/roboflow">
259
+ <img
260
+ src="https://media.roboflow.com/notebooks/template/icons/purple/youtube.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634652"
261
+ width="3%"
262
+ />
263
+ </a>
264
+ <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
265
+ <a href="https://roboflow.com">
266
+ <img
267
+ src="https://media.roboflow.com/notebooks/template/icons/purple/roboflow-app.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949746649"
268
+ width="3%"
269
+ />
270
+ </a>
271
+ <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
272
+ <a href="https://www.linkedin.com/company/roboflow-ai/">
273
+ <img
274
+ src="https://media.roboflow.com/notebooks/template/icons/purple/linkedin.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633691"
275
+ width="3%"
276
+ />
277
+ </a>
278
+ <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
279
+ <a href="https://docs.roboflow.com">
280
+ <img
281
+ src="https://media.roboflow.com/notebooks/template/icons/purple/knowledge.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634511"
282
+ width="3%"
283
+ />
284
+ </a>
285
+ <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
286
+ <a href="https://disuss.roboflow.com">
287
+ <img
288
+ src="https://media.roboflow.com/notebooks/template/icons/purple/forum.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633584"
289
+ width="3%"
290
+ />
291
+ <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
292
+ <a href="https://blog.roboflow.com">
293
+ <img
294
+ src="https://media.roboflow.com/notebooks/template/icons/purple/blog.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633605"
295
+ width="3%"
296
+ />
297
+ </a>
298
+ </a>
299
+ </div>