biolm-sdk 0.0.1__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 (204) hide show
  1. biolm_sdk-0.0.1/AUTHORS.rst +13 -0
  2. biolm_sdk-0.0.1/CONTRIBUTING.rst +128 -0
  3. biolm_sdk-0.0.1/HISTORY.rst +8 -0
  4. biolm_sdk-0.0.1/LICENSE +16 -0
  5. biolm_sdk-0.0.1/MANIFEST.in +11 -0
  6. biolm_sdk-0.0.1/PKG-INFO +166 -0
  7. biolm_sdk-0.0.1/README.rst +106 -0
  8. biolm_sdk-0.0.1/biolm/__init__.py +78 -0
  9. biolm_sdk-0.0.1/biolm/cli.py +3546 -0
  10. biolm_sdk-0.0.1/biolm/cli_entry.py +119 -0
  11. biolm_sdk-0.0.1/biolm/cli_theme.py +121 -0
  12. biolm_sdk-0.0.1/biolm/client.py +119 -0
  13. biolm_sdk-0.0.1/biolm/core/__init__.py +1 -0
  14. biolm_sdk-0.0.1/biolm/core/asynch.py +351 -0
  15. biolm_sdk-0.0.1/biolm/core/auth.py +1042 -0
  16. biolm_sdk-0.0.1/biolm/core/const.py +169 -0
  17. biolm_sdk-0.0.1/biolm/core/expression_evaluator.py +142 -0
  18. biolm_sdk-0.0.1/biolm/core/http.py +1581 -0
  19. biolm_sdk-0.0.1/biolm/core/legacy/__init__.py +12 -0
  20. biolm_sdk-0.0.1/biolm/core/legacy/api.py +365 -0
  21. biolm_sdk-0.0.1/biolm/core/legacy/cls.py +185 -0
  22. biolm_sdk-0.0.1/biolm/core/payloads.py +44 -0
  23. biolm_sdk-0.0.1/biolm/core/seqflow_auth.py +204 -0
  24. biolm_sdk-0.0.1/biolm/core/utils.py +71 -0
  25. biolm_sdk-0.0.1/biolm/core/validate.py +157 -0
  26. biolm_sdk-0.0.1/biolm/datasets_mlflow.py +430 -0
  27. biolm_sdk-0.0.1/biolm/examples.py +574 -0
  28. biolm_sdk-0.0.1/biolm/hub/__init__.py +22 -0
  29. biolm_sdk-0.0.1/biolm/hub/catalog.py +103 -0
  30. biolm_sdk-0.0.1/biolm/hub/config.py +86 -0
  31. biolm_sdk-0.0.1/biolm/hub/data/__init__.py +0 -0
  32. biolm_sdk-0.0.1/biolm/hub/data/catalog.json +35 -0
  33. biolm_sdk-0.0.1/biolm/hub/discovery.py +113 -0
  34. biolm_sdk-0.0.1/biolm/io/__init__.py +22 -0
  35. biolm_sdk-0.0.1/biolm/io/csv.py +152 -0
  36. biolm_sdk-0.0.1/biolm/io/fasta.py +248 -0
  37. biolm_sdk-0.0.1/biolm/io/json.py +179 -0
  38. biolm_sdk-0.0.1/biolm/io/pdb.py +153 -0
  39. biolm_sdk-0.0.1/biolm/ltc.py +1 -0
  40. biolm_sdk-0.0.1/biolm/models.py +276 -0
  41. biolm_sdk-0.0.1/biolm/pipeline/__init__.py +150 -0
  42. biolm_sdk-0.0.1/biolm/pipeline/async_executor.py +377 -0
  43. biolm_sdk-0.0.1/biolm/pipeline/base.py +1615 -0
  44. biolm_sdk-0.0.1/biolm/pipeline/clustering.py +493 -0
  45. biolm_sdk-0.0.1/biolm/pipeline/data.py +3639 -0
  46. biolm_sdk-0.0.1/biolm/pipeline/datastore.py +11 -0
  47. biolm_sdk-0.0.1/biolm/pipeline/datastore_duckdb.py +2797 -0
  48. biolm_sdk-0.0.1/biolm/pipeline/filters.py +935 -0
  49. biolm_sdk-0.0.1/biolm/pipeline/generative.py +1840 -0
  50. biolm_sdk-0.0.1/biolm/pipeline/mlm_remasking.py +693 -0
  51. biolm_sdk-0.0.1/biolm/pipeline/pipeline_def.py +575 -0
  52. biolm_sdk-0.0.1/biolm/pipeline/utils.py +574 -0
  53. biolm_sdk-0.0.1/biolm/pipeline/visualization.py +648 -0
  54. biolm_sdk-0.0.1/biolm/progress.py +55 -0
  55. biolm_sdk-0.0.1/biolm/protocols.py +987 -0
  56. biolm_sdk-0.0.1/biolm/protocols_mlflow.py +835 -0
  57. biolm_sdk-0.0.1/biolm/volumes.py +75 -0
  58. biolm_sdk-0.0.1/biolm/workspaces.py +75 -0
  59. biolm_sdk-0.0.1/biolm_sdk.egg-info/PKG-INFO +166 -0
  60. biolm_sdk-0.0.1/biolm_sdk.egg-info/SOURCES.txt +203 -0
  61. biolm_sdk-0.0.1/biolm_sdk.egg-info/dependency_links.txt +1 -0
  62. biolm_sdk-0.0.1/biolm_sdk.egg-info/entry_points.txt +7 -0
  63. biolm_sdk-0.0.1/biolm_sdk.egg-info/not-zip-safe +1 -0
  64. biolm_sdk-0.0.1/biolm_sdk.egg-info/requires.txt +40 -0
  65. biolm_sdk-0.0.1/biolm_sdk.egg-info/top_level.txt +2 -0
  66. biolm_sdk-0.0.1/biolmai/__init__.py +17 -0
  67. biolm_sdk-0.0.1/docs/Makefile +20 -0
  68. biolm_sdk-0.0.1/docs/_build/json/_static/api_reference_icon.png +0 -0
  69. biolm_sdk-0.0.1/docs/_build/json/_static/biolm_docs_logo_dark.png +0 -0
  70. biolm_sdk-0.0.1/docs/_build/json/_static/biolm_docs_logo_light.png +0 -0
  71. biolm_sdk-0.0.1/docs/_build/json/_static/biolm_logomark_transparent.png +0 -0
  72. biolm_sdk-0.0.1/docs/_build/json/_static/biolm_logomark_transparent_for_dark.png +0 -0
  73. biolm_sdk-0.0.1/docs/_build/json/_static/chat_agents_icon.png +0 -0
  74. biolm_sdk-0.0.1/docs/_build/json/_static/file.png +0 -0
  75. biolm_sdk-0.0.1/docs/_build/json/_static/jupyter_notebooks_icon.png +0 -0
  76. biolm_sdk-0.0.1/docs/_build/json/_static/minus.png +0 -0
  77. biolm_sdk-0.0.1/docs/_build/json/_static/model_docs_icon.png +0 -0
  78. biolm_sdk-0.0.1/docs/_build/json/_static/plus.png +0 -0
  79. biolm_sdk-0.0.1/docs/_build/json/_static/python_sdk_icon.png +0 -0
  80. biolm_sdk-0.0.1/docs/_build/json/_static/tutorials_icon.png +0 -0
  81. biolm_sdk-0.0.1/docs/_static/api_reference_icon.png +0 -0
  82. biolm_sdk-0.0.1/docs/_static/biolm_docs_logo_dark.png +0 -0
  83. biolm_sdk-0.0.1/docs/_static/biolm_docs_logo_light.png +0 -0
  84. biolm_sdk-0.0.1/docs/_static/biolm_logomark_transparent.png +0 -0
  85. biolm_sdk-0.0.1/docs/_static/biolm_logomark_transparent_for_dark.png +0 -0
  86. biolm_sdk-0.0.1/docs/_static/chat_agents_icon.png +0 -0
  87. biolm_sdk-0.0.1/docs/_static/jupyter_notebooks_icon.png +0 -0
  88. biolm_sdk-0.0.1/docs/_static/model_docs_icon.png +0 -0
  89. biolm_sdk-0.0.1/docs/_static/python_sdk_icon.png +0 -0
  90. biolm_sdk-0.0.1/docs/_static/tutorials_icon.png +0 -0
  91. biolm_sdk-0.0.1/docs/api-reference/biolm.core.legacy.rst +29 -0
  92. biolm_sdk-0.0.1/docs/api-reference/biolm.core.rst +93 -0
  93. biolm_sdk-0.0.1/docs/api-reference/biolm.hub.rst +7 -0
  94. biolm_sdk-0.0.1/docs/api-reference/biolm.io.rst +45 -0
  95. biolm_sdk-0.0.1/docs/api-reference/biolm.pipeline.rst +109 -0
  96. biolm_sdk-0.0.1/docs/api-reference/biolm.rst +128 -0
  97. biolm_sdk-0.0.1/docs/api-reference/index.rst +9 -0
  98. biolm_sdk-0.0.1/docs/api-reference/modules.rst +7 -0
  99. biolm_sdk-0.0.1/docs/authoring-guide.rst +55 -0
  100. biolm_sdk-0.0.1/docs/cli/dataset.rst +23 -0
  101. biolm_sdk-0.0.1/docs/cli/hub.rst +74 -0
  102. biolm_sdk-0.0.1/docs/cli/login.rst +63 -0
  103. biolm_sdk-0.0.1/docs/cli/logout.rst +19 -0
  104. biolm_sdk-0.0.1/docs/cli/model.rst +57 -0
  105. biolm_sdk-0.0.1/docs/cli/overview.rst +28 -0
  106. biolm_sdk-0.0.1/docs/cli/protocol.rst +25 -0
  107. biolm_sdk-0.0.1/docs/cli/reference.rst +14 -0
  108. biolm_sdk-0.0.1/docs/cli/status.rst +19 -0
  109. biolm_sdk-0.0.1/docs/cli/usage/authenticating.rst +4 -0
  110. biolm_sdk-0.0.1/docs/cli/usage/datasets.rst +4 -0
  111. biolm_sdk-0.0.1/docs/cli/usage/models.rst +4 -0
  112. biolm_sdk-0.0.1/docs/cli/usage/protocols.rst +4 -0
  113. biolm_sdk-0.0.1/docs/cli/usage/workspaces.rst +4 -0
  114. biolm_sdk-0.0.1/docs/cli/workspace.rst +23 -0
  115. biolm_sdk-0.0.1/docs/conf.py +340 -0
  116. biolm_sdk-0.0.1/docs/getting-started/authentication.rst +143 -0
  117. biolm_sdk-0.0.1/docs/getting-started/concepts.rst +178 -0
  118. biolm_sdk-0.0.1/docs/getting-started/installation.rst +60 -0
  119. biolm_sdk-0.0.1/docs/getting-started/migration-1.0.rst +65 -0
  120. biolm_sdk-0.0.1/docs/getting-started/overview.rst +18 -0
  121. biolm_sdk-0.0.1/docs/getting-started/quickstart.rst +48 -0
  122. biolm_sdk-0.0.1/docs/index.rst +82 -0
  123. biolm_sdk-0.0.1/docs/make.bat +36 -0
  124. biolm_sdk-0.0.1/docs/protocols/about.rst +26 -0
  125. biolm_sdk-0.0.1/docs/protocols/execution.rst +21 -0
  126. biolm_sdk-0.0.1/docs/protocols/inputs.rst +22 -0
  127. biolm_sdk-0.0.1/docs/protocols/output.rst +15 -0
  128. biolm_sdk-0.0.1/docs/protocols/schema.rst +9 -0
  129. biolm_sdk-0.0.1/docs/protocols/tasks.rst +27 -0
  130. biolm_sdk-0.0.1/docs/resources/rest-api.rst +4 -0
  131. biolm_sdk-0.0.1/docs/sdk/api-reference/index.rst +9 -0
  132. biolm_sdk-0.0.1/docs/sdk/faq.rst +67 -0
  133. biolm_sdk-0.0.1/docs/sdk/io.rst +4 -0
  134. biolm_sdk-0.0.1/docs/sdk/models.rst +15 -0
  135. biolm_sdk-0.0.1/docs/sdk/overview.rst +46 -0
  136. biolm_sdk-0.0.1/docs/sdk/protocols.rst +4 -0
  137. biolm_sdk-0.0.1/docs/sdk/usage/async-sync.rst +226 -0
  138. biolm_sdk-0.0.1/docs/sdk/usage/batching.rst +211 -0
  139. biolm_sdk-0.0.1/docs/sdk/usage/error-handling.rst +151 -0
  140. biolm_sdk-0.0.1/docs/sdk/usage/io.rst +272 -0
  141. biolm_sdk-0.0.1/docs/sdk/usage/rate_limiting.rst +60 -0
  142. biolm_sdk-0.0.1/docs/sdk/usage/usage.rst +134 -0
  143. biolm_sdk-0.0.1/docs/sdk/volumes.rst +4 -0
  144. biolm_sdk-0.0.1/docs/sdk/workspaces.rst +4 -0
  145. biolm_sdk-0.0.1/docs/tutorials_use_cases/notebooks.rst +9 -0
  146. biolm_sdk-0.0.1/pyproject.toml +120 -0
  147. biolm_sdk-0.0.1/setup.cfg +35 -0
  148. biolm_sdk-0.0.1/setup.py +95 -0
  149. biolm_sdk-0.0.1/tests/__init__.py +1 -0
  150. biolm_sdk-0.0.1/tests/fixtures/generate_input.json +6 -0
  151. biolm_sdk-0.0.1/tests/fixtures/generate_input_antifold.json +5 -0
  152. biolm_sdk-0.0.1/tests/fixtures/generate_input_prompt.json +6 -0
  153. biolm_sdk-0.0.1/tests/fixtures/generate_input_sequence.json +6 -0
  154. biolm_sdk-0.0.1/tests/fixtures/generate_input_sequence_clean.json +6 -0
  155. biolm_sdk-0.0.1/tests/fixtures/multi_model.pdb +10 -0
  156. biolm_sdk-0.0.1/tests/fixtures/sample.csv +5 -0
  157. biolm_sdk-0.0.1/tests/fixtures/sample.fasta +9 -0
  158. biolm_sdk-0.0.1/tests/fixtures/sample.pdb +12 -0
  159. biolm_sdk-0.0.1/tests/test_abatch_calls.py +276 -0
  160. biolm_sdk-0.0.1/tests/test_aclient.py +315 -0
  161. biolm_sdk-0.0.1/tests/test_advanced_features.py +675 -0
  162. biolm_sdk-0.0.1/tests/test_auth_integration.py +155 -0
  163. biolm_sdk-0.0.1/tests/test_batch_error_retry.py +80 -0
  164. biolm_sdk-0.0.1/tests/test_batch_errors.py +47 -0
  165. biolm_sdk-0.0.1/tests/test_biolm_shim.py +23 -0
  166. biolm_sdk-0.0.1/tests/test_biolmai.py +237 -0
  167. biolm_sdk-0.0.1/tests/test_cli_hub.py +46 -0
  168. biolm_sdk-0.0.1/tests/test_cli_model_io.py +369 -0
  169. biolm_sdk-0.0.1/tests/test_cli_model_list.py +192 -0
  170. biolm_sdk-0.0.1/tests/test_cli_model_run.py +349 -0
  171. biolm_sdk-0.0.1/tests/test_cli_model_show.py +133 -0
  172. biolm_sdk-0.0.1/tests/test_cli_theme.py +48 -0
  173. biolm_sdk-0.0.1/tests/test_client.py +396 -0
  174. biolm_sdk-0.0.1/tests/test_clustering.py +260 -0
  175. biolm_sdk-0.0.1/tests/test_concurrent_batches.py +230 -0
  176. biolm_sdk-0.0.1/tests/test_const_env.py +85 -0
  177. biolm_sdk-0.0.1/tests/test_datasets_mlflow.py +576 -0
  178. biolm_sdk-0.0.1/tests/test_datastore.py +396 -0
  179. biolm_sdk-0.0.1/tests/test_duckdb_datastore.py +555 -0
  180. biolm_sdk-0.0.1/tests/test_embedding_pipeline.py +501 -0
  181. biolm_sdk-0.0.1/tests/test_example_generation.py +491 -0
  182. biolm_sdk-0.0.1/tests/test_filters.py +592 -0
  183. biolm_sdk-0.0.1/tests/test_generation_workingset.py +564 -0
  184. biolm_sdk-0.0.1/tests/test_hub_config.py +38 -0
  185. biolm_sdk-0.0.1/tests/test_hub_discovery.py +18 -0
  186. biolm_sdk-0.0.1/tests/test_init_extras_gate.py +168 -0
  187. biolm_sdk-0.0.1/tests/test_integration.py +132 -0
  188. biolm_sdk-0.0.1/tests/test_io.py +554 -0
  189. biolm_sdk-0.0.1/tests/test_iterables.py +123 -0
  190. biolm_sdk-0.0.1/tests/test_jupyter_context.py +149 -0
  191. biolm_sdk-0.0.1/tests/test_max_items.py +184 -0
  192. biolm_sdk-0.0.1/tests/test_mlm_remasking.py +560 -0
  193. biolm_sdk-0.0.1/tests/test_oauth_auth.py +286 -0
  194. biolm_sdk-0.0.1/tests/test_pipeline.py +464 -0
  195. biolm_sdk-0.0.1/tests/test_pipeline_complete.py +2305 -0
  196. biolm_sdk-0.0.1/tests/test_progress.py +21 -0
  197. biolm_sdk-0.0.1/tests/test_protocols.py +725 -0
  198. biolm_sdk-0.0.1/tests/test_protocols_mlflow.py +584 -0
  199. biolm_sdk-0.0.1/tests/test_ranking_filter.py +214 -0
  200. biolm_sdk-0.0.1/tests/test_rate_limit.py +244 -0
  201. biolm_sdk-0.0.1/tests/test_remasking_config.py +129 -0
  202. biolm_sdk-0.0.1/tests/test_schemas.py +30 -0
  203. biolm_sdk-0.0.1/tests/test_specs.py +366 -0
  204. biolm_sdk-0.0.1/tests/test_utils.py +223 -0
@@ -0,0 +1,13 @@
1
+ =======
2
+ Credits
3
+ =======
4
+
5
+ Development Lead
6
+ ----------------
7
+
8
+ * Nikhil Haas <nikhil@nikhilhaas.com>
9
+
10
+ Contributors
11
+ ------------
12
+
13
+ None yet. Why not be the first?
@@ -0,0 +1,128 @@
1
+ .. highlight:: shell
2
+
3
+ ============
4
+ Contributing
5
+ ============
6
+
7
+ Contributions are welcome, and they are greatly appreciated! Every little bit
8
+ helps, and credit will always be given.
9
+
10
+ You can contribute in many ways:
11
+
12
+ Types of Contributions
13
+ ----------------------
14
+
15
+ Report Bugs
16
+ ~~~~~~~~~~~
17
+
18
+ Report bugs at https://github.com/BioLM/py-biolm/issues.
19
+
20
+ If you are reporting a bug, please include:
21
+
22
+ * Your operating system name and version.
23
+ * Any details about your local setup that might be helpful in troubleshooting.
24
+ * Detailed steps to reproduce the bug.
25
+
26
+ Fix Bugs
27
+ ~~~~~~~~
28
+
29
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
30
+ wanted" is open to whoever wants to implement it.
31
+
32
+ Implement Features
33
+ ~~~~~~~~~~~~~~~~~~
34
+
35
+ Look through the GitHub issues for features. Anything tagged with "enhancement"
36
+ and "help wanted" is open to whoever wants to implement it.
37
+
38
+ Write Documentation
39
+ ~~~~~~~~~~~~~~~~~~~
40
+
41
+ BioLM AI could always use more documentation, whether as part of the
42
+ official BioLM AI docs, in docstrings, or even on the web in blog posts,
43
+ articles, and such.
44
+
45
+ Submit Feedback
46
+ ~~~~~~~~~~~~~~~
47
+
48
+ The best way to send feedback is to file an issue at https://github.com/BioLM/py-biolm/issues.
49
+
50
+ If you are proposing a feature:
51
+
52
+ * Explain in detail how it would work.
53
+ * Keep the scope as narrow as possible, to make it easier to implement.
54
+ * Remember that this is a volunteer-driven project, and that contributions
55
+ are welcome :)
56
+
57
+ Get Started!
58
+ ------------
59
+
60
+ Ready to contribute? Here's how to set up `biolmai` for local development.
61
+
62
+ 1. Fork the `biolmai` repo on GitHub.
63
+ 2. Clone your fork locally::
64
+
65
+ $ git clone git@github.com:your_name_here/biolmai.git
66
+
67
+ 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
68
+
69
+ $ mkvirtualenv biolmai
70
+ $ cd biolmai/
71
+ $ python setup.py develop
72
+
73
+ 4. Create a branch for local development::
74
+
75
+ $ git checkout -b name-of-your-bugfix-or-feature
76
+
77
+ Now you can make your changes locally.
78
+
79
+ 5. When you're done making changes, check that your changes pass flake8 and the
80
+ tests, including testing other Python versions with tox::
81
+
82
+ $ flake8 biolmai tests
83
+ $ python setup.py test or pytest
84
+ $ tox
85
+
86
+ To get flake8 and tox, just pip install them into your virtualenv.
87
+
88
+ 6. Commit your changes and push your branch to GitHub::
89
+
90
+ $ git add .
91
+ $ git commit -m "Your detailed description of your changes."
92
+ $ git push origin name-of-your-bugfix-or-feature
93
+
94
+ 7. Submit a pull request through the GitHub website.
95
+
96
+ Pull Request Guidelines
97
+ -----------------------
98
+
99
+ Before you submit a pull request, check that it meets these guidelines:
100
+
101
+ 1. The pull request should include tests.
102
+ 2. If the pull request adds functionality, the docs should be updated. Put
103
+ your new functionality into a function with a docstring, and add the
104
+ feature to the list in README.rst.
105
+ 3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
106
+ https://travis-ci.com/BioLM/py-biolm/pull_requests
107
+ and make sure that the tests pass for all supported Python versions.
108
+
109
+ Tips
110
+ ----
111
+
112
+ To run a subset of tests::
113
+
114
+ $ pytest tests.test_biolmai
115
+
116
+
117
+ Deploying
118
+ ---------
119
+
120
+ A reminder for the maintainers on how to deploy.
121
+ Make sure all your changes are committed (including an entry in HISTORY.rst).
122
+ Then run::
123
+
124
+ $ bump2version patch # possible: major / minor / patch
125
+ $ git push
126
+ $ git push --tags
127
+
128
+ Travis will then deploy to PyPI if tests pass.
@@ -0,0 +1,8 @@
1
+ =======
2
+ History
3
+ =======
4
+
5
+ 0.1.0 (2023-09-04)
6
+ ------------------
7
+
8
+ * First release on PyPI.
@@ -0,0 +1,16 @@
1
+ Apache Software License 2.0
2
+
3
+ Copyright (c) 2023, Nikhil Haas
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+
@@ -0,0 +1,11 @@
1
+ include AUTHORS.rst
2
+ include CONTRIBUTING.rst
3
+ include HISTORY.rst
4
+ include LICENSE
5
+ include README.rst
6
+
7
+ recursive-include tests *
8
+ recursive-exclude * __pycache__
9
+ recursive-exclude * *.py[co]
10
+
11
+ recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
@@ -0,0 +1,166 @@
1
+ Metadata-Version: 2.4
2
+ Name: biolm-sdk
3
+ Version: 0.0.1
4
+ Summary: BioLM Python client for the hosted platform and biolm-hub
5
+ Home-page: https://github.com/BioLM/py-biolm
6
+ Author: BioLM
7
+ Author-email: BioLM <support@biolm.ai>
8
+ License: Apache Software License 2.0
9
+ Keywords: biolm,biolmai,bioai
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Natural Language :: English
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE
24
+ License-File: AUTHORS.rst
25
+ Requires-Dist: httpx>=0.23.0
26
+ Requires-Dist: httpcore
27
+ Requires-Dist: Click>=6.0
28
+ Requires-Dist: requests
29
+ Requires-Dist: aiodns
30
+ Requires-Dist: synchronicity>=0.5.0; python_version >= "3.9"
31
+ Requires-Dist: synchronicity<0.5.0; python_version < "3.9"
32
+ Requires-Dist: typing_extensions; python_version < "3.9"
33
+ Requires-Dist: aiohttp<=3.8.6; python_version < "3.12"
34
+ Requires-Dist: aiohttp>=3.9.0; python_version >= "3.12"
35
+ Requires-Dist: async-lru
36
+ Requires-Dist: aiofiles
37
+ Requires-Dist: cryptography
38
+ Requires-Dist: h2
39
+ Requires-Dist: nest_asyncio
40
+ Requires-Dist: rich>=13.0.0
41
+ Requires-Dist: pyyaml>=5.0
42
+ Requires-Dist: jsonschema<5,>=4.0
43
+ Provides-Extra: pipeline
44
+ Requires-Dist: pandas<3,>=1.3.0; extra == "pipeline"
45
+ Requires-Dist: numpy<3,>=1.20; extra == "pipeline"
46
+ Requires-Dist: tqdm>=4.60.0; extra == "pipeline"
47
+ Requires-Dist: matplotlib>=3.3.0; extra == "pipeline"
48
+ Requires-Dist: seaborn>=0.11.0; extra == "pipeline"
49
+ Requires-Dist: scikit-learn>=1.0; extra == "pipeline"
50
+ Requires-Dist: umap-learn>=0.5.0; extra == "pipeline"
51
+ Requires-Dist: biotite>=0.34.0; extra == "pipeline"
52
+ Requires-Dist: biopython>=1.78; extra == "pipeline"
53
+ Requires-Dist: scipy>=1.7.0; extra == "pipeline"
54
+ Requires-Dist: duckdb<2,>=0.9.0; extra == "pipeline"
55
+ Requires-Dist: pyarrow>=10.0.0; extra == "pipeline"
56
+ Dynamic: author
57
+ Dynamic: home-page
58
+ Dynamic: license-file
59
+ Dynamic: requires-python
60
+
61
+ ========
62
+ BioLM AI
63
+ ========
64
+
65
+
66
+ .. image:: https://img.shields.io/pypi/v/biolm.svg
67
+ :target: https://pypi.python.org/pypi/biolm
68
+
69
+ .. image:: https://api.travis-ci.com/BioLM/py-biolm.svg?branch=production
70
+ :target: https://travis-ci.org/github/BioLM/py-biolm
71
+
72
+ .. image:: https://readthedocs.org/projects/biolm-ai/badge/?version=latest
73
+ :target: https://biolm-ai.readthedocs.io/en/latest/?version=latest
74
+ :alt: Documentation Status
75
+
76
+
77
+
78
+
79
+ Python client and SDK for `BioLM <https://biolm.ai>`_
80
+
81
+ Install the package:
82
+
83
+ .. code-block:: bash
84
+
85
+ pip install biolm
86
+
87
+ Open-source models (biolm-hub):
88
+
89
+ .. code-block:: bash
90
+
91
+ # In biolm-hub: bh serve
92
+ biolm hub set
93
+ biolm model list
94
+ biolm model run esm2-8m encode -i seq.json
95
+
96
+ See ``docs/cli/hub.rst``.
97
+
98
+ Basic usage:
99
+
100
+ .. code-block:: python
101
+
102
+ from biolm import biolm
103
+
104
+ # Encode a single sequence
105
+ result = biolm(entity="esm2-8m", action="encode", type="sequence", items="MSILVTRPSPAGEEL")
106
+
107
+ # Predict a batch of sequences
108
+ result = biolm(entity="esmfold", action="predict", type="sequence", items=["SEQ1", "SEQ2"])
109
+
110
+ # Write results to disk
111
+ biolm(entity="esmfold", action="predict", type="sequence", items=["SEQ1", "SEQ2"], output='disk', file_path="results.jsonl")
112
+
113
+ Asynchronous usage:
114
+
115
+ .. code-block:: python
116
+
117
+ from biolm.core.http import BioLMApiClient
118
+ import asyncio
119
+
120
+ async def main():
121
+ model = BioLMApiClient("esmfold")
122
+ result = await model.predict(items=[{"sequence": "MDNELE"}])
123
+ print(result)
124
+
125
+ asyncio.run(main())
126
+
127
+ Overview
128
+ ========
129
+
130
+ The BioLM Python client provides a high-level, user-friendly interface for interacting with the BioLM API. It supports both synchronous and asynchronous usage, automatic batching, flexible error handling, and efficient processing of biological data.
131
+
132
+ Main features:
133
+
134
+ - High-level BioLM constructor for quick requests
135
+ - Sync and async interfaces
136
+ - Automatic or custom rate limiting/throttling
137
+ - Schema-based batch size detection
138
+ - Flexible input formats (single key + list, or list of dicts)
139
+ - Low memory usage via generators
140
+ - Flexible error handling (raise, continue, or stop on error)
141
+ - Universal HTTP client for both sync and async
142
+
143
+ Features
144
+ ========
145
+
146
+ - **High-level constructor**: Instantly run an API call with a single line.
147
+ - **Sync and async**: Use `BioLM` for sync, or `BioLMApiClient` for async.
148
+ - **Flexible rate limiting**: Use API throttle, disable, or set your own (e.g., '1000/second').
149
+ - **Schema-based batching**: Automatically queries API for max batch size.
150
+ - **Flexible input**: Accepts a single key and list, or list of dicts, or list of lists for advanced batching.
151
+ - **Low memory**: Uses generators for validation and batching.
152
+ - **Error handling**: Raise HTTPX errors, continue on error, or stop on first error.
153
+ - **Disk output**: Write results as JSONL to disk.
154
+ - **Universal HTTP client**: Efficient for both sync and async.
155
+ - **Direct access to schema and batching**: Use `BioLMApi` for advanced workflows, including `.schema()`, `.call()`, and `._batch_call_autoschema_or_manual()`.
156
+
157
+ **Example endpoints and actions:**
158
+
159
+ - `esm2-8m/encode`: Embedding for protein sequences.
160
+ - `esmfold/predict`: Structure prediction for protein sequences.
161
+ - `progen2-oas/generate`: Sequence generation from a context string.
162
+ - `dnabert2/predict`: Masked prediction for protein sequences.
163
+ - `ablang2/encode`: Embeddings for paired-chain antibodies.
164
+
165
+ * Free software: Apache Software License 2.0
166
+ * Documentation: https://docs.biolm.ai
@@ -0,0 +1,106 @@
1
+ ========
2
+ BioLM AI
3
+ ========
4
+
5
+
6
+ .. image:: https://img.shields.io/pypi/v/biolm.svg
7
+ :target: https://pypi.python.org/pypi/biolm
8
+
9
+ .. image:: https://api.travis-ci.com/BioLM/py-biolm.svg?branch=production
10
+ :target: https://travis-ci.org/github/BioLM/py-biolm
11
+
12
+ .. image:: https://readthedocs.org/projects/biolm-ai/badge/?version=latest
13
+ :target: https://biolm-ai.readthedocs.io/en/latest/?version=latest
14
+ :alt: Documentation Status
15
+
16
+
17
+
18
+
19
+ Python client and SDK for `BioLM <https://biolm.ai>`_
20
+
21
+ Install the package:
22
+
23
+ .. code-block:: bash
24
+
25
+ pip install biolm
26
+
27
+ Open-source models (biolm-hub):
28
+
29
+ .. code-block:: bash
30
+
31
+ # In biolm-hub: bh serve
32
+ biolm hub set
33
+ biolm model list
34
+ biolm model run esm2-8m encode -i seq.json
35
+
36
+ See ``docs/cli/hub.rst``.
37
+
38
+ Basic usage:
39
+
40
+ .. code-block:: python
41
+
42
+ from biolm import biolm
43
+
44
+ # Encode a single sequence
45
+ result = biolm(entity="esm2-8m", action="encode", type="sequence", items="MSILVTRPSPAGEEL")
46
+
47
+ # Predict a batch of sequences
48
+ result = biolm(entity="esmfold", action="predict", type="sequence", items=["SEQ1", "SEQ2"])
49
+
50
+ # Write results to disk
51
+ biolm(entity="esmfold", action="predict", type="sequence", items=["SEQ1", "SEQ2"], output='disk', file_path="results.jsonl")
52
+
53
+ Asynchronous usage:
54
+
55
+ .. code-block:: python
56
+
57
+ from biolm.core.http import BioLMApiClient
58
+ import asyncio
59
+
60
+ async def main():
61
+ model = BioLMApiClient("esmfold")
62
+ result = await model.predict(items=[{"sequence": "MDNELE"}])
63
+ print(result)
64
+
65
+ asyncio.run(main())
66
+
67
+ Overview
68
+ ========
69
+
70
+ The BioLM Python client provides a high-level, user-friendly interface for interacting with the BioLM API. It supports both synchronous and asynchronous usage, automatic batching, flexible error handling, and efficient processing of biological data.
71
+
72
+ Main features:
73
+
74
+ - High-level BioLM constructor for quick requests
75
+ - Sync and async interfaces
76
+ - Automatic or custom rate limiting/throttling
77
+ - Schema-based batch size detection
78
+ - Flexible input formats (single key + list, or list of dicts)
79
+ - Low memory usage via generators
80
+ - Flexible error handling (raise, continue, or stop on error)
81
+ - Universal HTTP client for both sync and async
82
+
83
+ Features
84
+ ========
85
+
86
+ - **High-level constructor**: Instantly run an API call with a single line.
87
+ - **Sync and async**: Use `BioLM` for sync, or `BioLMApiClient` for async.
88
+ - **Flexible rate limiting**: Use API throttle, disable, or set your own (e.g., '1000/second').
89
+ - **Schema-based batching**: Automatically queries API for max batch size.
90
+ - **Flexible input**: Accepts a single key and list, or list of dicts, or list of lists for advanced batching.
91
+ - **Low memory**: Uses generators for validation and batching.
92
+ - **Error handling**: Raise HTTPX errors, continue on error, or stop on first error.
93
+ - **Disk output**: Write results as JSONL to disk.
94
+ - **Universal HTTP client**: Efficient for both sync and async.
95
+ - **Direct access to schema and batching**: Use `BioLMApi` for advanced workflows, including `.schema()`, `.call()`, and `._batch_call_autoschema_or_manual()`.
96
+
97
+ **Example endpoints and actions:**
98
+
99
+ - `esm2-8m/encode`: Embedding for protein sequences.
100
+ - `esmfold/predict`: Structure prediction for protein sequences.
101
+ - `progen2-oas/generate`: Sequence generation from a context string.
102
+ - `dnabert2/predict`: Masked prediction for protein sequences.
103
+ - `ablang2/encode`: Embeddings for paired-chain antibodies.
104
+
105
+ * Free software: Apache Software License 2.0
106
+ * Documentation: https://docs.biolm.ai
@@ -0,0 +1,78 @@
1
+ """Top-level package for BioLM."""
2
+ __author__ = """Nikhil Haas"""
3
+ __email__ = "nikhil@biolm.ai"
4
+ __version__ = '0.0.1'
5
+
6
+ from biolm.core.http import BioLMApi, BioLMApiClient
7
+ from biolm.client import BioLM
8
+ from biolm.models import Model, predict, encode, generate
9
+ from biolm.protocols import Protocol
10
+ from biolm.workspaces import Workspace
11
+ from biolm.volumes import Volume
12
+ from biolm.examples import get_example, list_models
13
+ from biolm.io import (
14
+ load_fasta,
15
+ to_fasta,
16
+ load_csv,
17
+ to_csv,
18
+ load_pdb,
19
+ to_pdb,
20
+ load_json,
21
+ to_json,
22
+ )
23
+
24
+ try:
25
+ from biolm import pipeline
26
+ _HAS_PIPELINE = True
27
+ except ImportError:
28
+ _HAS_PIPELINE = False
29
+
30
+ from typing import Optional, Union, List, Any
31
+
32
+ __all__ = [
33
+ 'BioLM',
34
+ 'biolm',
35
+ 'BioLMApi',
36
+ 'BioLMApiClient',
37
+ 'Model',
38
+ 'Protocol',
39
+ 'Workspace',
40
+ 'Volume',
41
+ 'predict',
42
+ 'encode',
43
+ 'generate',
44
+ 'get_example',
45
+ 'list_models',
46
+ 'load_fasta',
47
+ 'to_fasta',
48
+ 'load_csv',
49
+ 'to_csv',
50
+ 'load_pdb',
51
+ 'to_pdb',
52
+ 'load_json',
53
+ 'to_json',
54
+ ]
55
+ if _HAS_PIPELINE:
56
+ __all__.append('pipeline')
57
+
58
+
59
+ def biolm(
60
+ *,
61
+ entity: str,
62
+ action: str,
63
+ type: Optional[str] = None,
64
+ items: Union[Any, List[Any]],
65
+ params: Optional[dict] = None,
66
+ api_key: Optional[str] = None,
67
+ **kwargs
68
+ ) -> Any:
69
+ """Top-level convenience function that wraps the BioLM class and returns the result."""
70
+ return BioLM(
71
+ entity=entity,
72
+ action=action,
73
+ type=type,
74
+ items=items,
75
+ params=params,
76
+ api_key=api_key,
77
+ **kwargs
78
+ )