Skip to main content

This module is a means for interfacing with projectkiwi.io using python.

Project description

Projectkiwi3 Client

This package adds a basic python interface for the projectkiwi api.

Installation

pip install projectkiwi3

Getting Started

Retrieve your projectkiwi API key here: https://projectkiwi.io/developer

import projectkiwi3

client = projectkiwi3.Client("YOUR_API_KEY")

# list all our projects
projects = client.getProjects()



Reading Annotations

project = projects[0]

# get current annotations
annotations = client.getAnnotations(project.id)

Adding Annotations

# get labels
newLabel = client.addLabel(project.id, "demo label", "rgb(3, 186, 252)")

# create new annotation
newAnnotation = client.addAnnotation(
    project.id, 
    coordinates=[[-123.4, 56.789012]], 
    shape="Point", 
    labelId=newLabel.id
    confidence=1.0
)

print(newAnnotation)
# id=553971 sub='google-oauth2|115859123295676188590' shape='Point' createdAt='2024-09-05T18:47:17.529Z' confidence=1.0 labelId=3 label=Label(id=3, name='demo label', color='rgb(3, 186, 252)', active=True, modifiedAt='2024-07-15T20:29:59.697Z') coordinates=[[-123.4, 56.789012]]



Working with labeling Queues

Labeling Queues allow us to break up larger labeling tasks in to bite size portions, easily digestible for both humans and GPUs.

import matplotlib.pyplot as plt

# list out all labeling queues in the project
labelingQueues = client.getLabelingQueues(project.id)

# let's just pick out the latest one
labelingQueue = labelingQueues[-1]

# find imagery layer to use - every geotiff you upload creates an imagery layer
imageryLayer = client.getAllImagery(project.id)[-1]

# Preview an image for a single task within the labeling queue
task = labelingQueue.labelingTasks[-1]
img = client.getImageForTask(imageryLayer, task.coordinates)
plt.imshow(img)
plt.show()

preview image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

projectkiwi3-0.1.8.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

projectkiwi3-0.1.8-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file projectkiwi3-0.1.8.tar.gz.

File metadata

  • Download URL: projectkiwi3-0.1.8.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for projectkiwi3-0.1.8.tar.gz
Algorithm Hash digest
SHA256 177262253b32e922a8db9ac8fa055704744fb3684554626ae62b6448d321f04b
MD5 9ed9f59116e38757190279a8ba4fea80
BLAKE2b-256 26d3607d3924365773a5b9a4400f063918c8b787442a1038d7bdfb4c4fe476a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for projectkiwi3-0.1.8.tar.gz:

Publisher: python-publish.yml on michaelthoreau/projectkiwi3-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file projectkiwi3-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: projectkiwi3-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for projectkiwi3-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b5fcba7d75e3b1dd52f6ea8c792be594899531fa40ed61af87d9a5e565970051
MD5 28d087a881073173a5b2ec7c36d95d5e
BLAKE2b-256 0cfd5127c89e2c036b59615e5c0118d4fb474651ceb63c4f1cff93dc02d5edb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for projectkiwi3-0.1.8-py3-none-any.whl:

Publisher: python-publish.yml on michaelthoreau/projectkiwi3-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page