Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Core mono-module for Labelbox's Python SDK.
rye sync --all-features # to install labelbox[data] dependencies
The SDK source (excluding tests and support tools) is organized into the following packages/modules:
data/
package contains code that maps annotations (labels or pre-labels) to
Python objects, as well as serialization and deserialization tools for converting
between NDJson and Annotation Types.orm/
package contains code that supports the general mapping of Labelbox
data to Python objects. This includes base classes, attribute (field and
relationship) classes, generic GraphQL queries etc.schema/
package contains definitions of classes which represent data type
(e.g. Project, Label etc.). It relies on orm/
classes for easy and succinct
object definitions. It also contains custom functionalities and custom GraphQL
templates where necessary.client.py
contains the Client
class that's the client-side stub for
communicating with Labelbox servers.exceptions.py
contains declarations for all Labelbox errors.pagination.py
contains support for paginated relationship and collection
fetching.utils.py
contains utility functions.rye run unit
LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run integration
For more info on how to get a LABELBOX_TEST_API_KEY
Labelbox API key docs.
Integration tests by default will run against your account that you provide an API Key from and modify its data. If you want to run integration tests, without it impacting your existing account, create an additional account using a secondary e-mail on Labelbox. Free accounts are sufficent for integration testing purposes.
You can also use a .env
file if you prefer instead of needing to type out the environmental overrides every single time you want to run commands. Please add a --env-file
parameter to the test command (EG rye --env-file=.env run integration
).
For testing the impact of the extra installs included with labelbox[data]
, run the following:
LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run data
By default rye sync
does not install the extra packages needed in labelbox[data]
. You'll need to run rye sync --all-features
. Do not checkin requirements.lock
or requirements-dev.lock
after doing this.
Before making a commit, to automatically adhere to our formatting standards, it is recommended to install and activate pre-commit
pip install pre-commit
pre-commit install
After the above, running git commit ...
will attempt to fix formatting,
and make necessary changes to files. You will then need to stage those files again.
You may also manually format your code by running the following:
rye run lint
To generate documentation for all modules (ReadTheDocs
), run the following command.
rye run docs
FAQs
Labelbox Python API
We found that labelbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.