benchling_typescript_sdk
Version:
Typescript SDK for Benchling API
30 lines (14 loc) • 1.79 kB
Markdown
# Benchling SDK with Typescript
## NOT COMPLETED - Work in Progress
Almost everything that is bad about the official Python Benchling SDK stems from the fact that it is written in python.
I made a Benchling API SDK in Typescript so that I never have to wonder ever again what I need to provide as input parameters, or as body, to benchling.
And aside from always knowing what each function is expecting, I have hidden a many annoying gochas for developer's view.
Example Improvements
* Want to get more than 100 containers by barcode? My SDK will handle the sub-queries for you.
* Want to upload a file and not need to think about about how big it is? My SDK figures it out for you.
* Want to wait for all transfers to go through, instead of chunking them up and waiting X at a time? Done.
* What to get a lot of audit CSVs, but are afraid to go over the limits? SDK again staggers the calls so that you don't hit the limit.
In general, this SDK abstracts non-intuitive parts of the Benchling API that complicate your efforts.
Of course, I copied all the best parts of the Benchling Python SDK: including automatic retries on retriable errors, continuous re-authenticaion of client_id credentials in background, and awaiting tasks (although I take the 'baked-in' approach of awaiting for tasks to finish farther than python SDK does.)
I also create what I call 'Super Benchling' API endpoints for functions that don't exist in the normal API. For exmaple: if you want to create plates with contents, Benchling API requires that you first create plates, and then find the new container_ids for each well, then add contents 1 by 1 to each well. This SDK has a method do perform those steps for you.
I would say more, but this is Typescript! Just install it!