Skip to main content

crowdAI API

build status

python client for server side API of the crowdai.org webapp.

Installation

Deployment

pip install git+https://github.com/crowdAI/crowdai_api.git

Development

git clone https://github.com/crowdAI/crowdai_api
cd crowdai_api
pip install -r requirements_dev.txt
pip install -e .

Usage

Instantiate API object

from crowdai_api import API as CROWDAI_API
auth_token="<YOUR CROWDAI AUTH TOKEN>"
api = CROWDAI_API(auth_token)

Authenticate participant

  • with API_KEY
api.authenticate_participant(EXAMPLE_API_KEY)
  • with username
api_key = api.authenticate_participant_with_username("spMohanty")

Get all Submissions

challenge_id = "test_challenge"
submissions = api.get_all_submissions(challenge_id)
print(submissions)

Create Submission

challenge_id = "test_challenge"
submission = api.create_submission(challenge_id)
print(submission)
# Output
# ========================================
# CrowdAISubmission	:	5261
# 	challenge_id	:	test_challenge
# 	round_id	:	False
# 	score	:	False
# 	score_secondary	:	False
# 	grading_status	:	submitted
# 	message	:
# ========================================

Get submission

submission_id = 5262
challenge_id = "test_challenge"
submission = api.get_submission(challenge_id, submission_id)

Update submission

Assuming you have a submission object by using api.create_submission or api.get_submission. You can update the submission by :

# Update params
submission.grading_status = "graded"
submission.score = 0.98
submission.score_secondary = 0.98
submission.update()
print(submission)
# Output#
# ========================================
# CrowdAISubmission	:	5262
# 	challenge_id	:	test_challenge
# 	round_id	:	False
# 	score	:	0.98
# 	score_secondary	:	0.98
# 	grading_status	:	graded
# 	message	:
# ========================================

Tests

# Setup the environment varriables
cp environ.sh.example environ.sh
# Then modify the respective environment variables
source environ.sh
pytests tests/

Author

S.P.Mohanty sharada.mohanty@epfl.ch

Release files for crowdai-api 0.1.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crowdai-api 0.1.22
File Size Uploaded
crowdai_api-0.1.22.tar.gz 9.2 kB Details

Release files / crowdai_api-0.1.22.tar.gz

Download URL crowdai_api-0.1.22.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2a7a2bc54fb90229420fc2ae43148ea78913e11dcc95b129e99380f2b15d0a96
BLAKE2b-256 checksum
How to use checksums
0cee55912b05af8994a190280e3281a18720f8d69da02dcb7ff44e1b96974345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.1.22 This release

1 release file

0.1.21

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page