greatexpectationslabs / cooper-pair

Cooper Pair is a Python library to simplify programmatic access to the Allotrope GraphQL API.
Apache License 2.0
0 stars 0 forks source link

Ids are confusing. #5

Open abegong opened 6 years ago

abegong commented 6 years ago

It's weird to run get_dataset(id=1)

and get back

pair.get_dataset(1)
Out[18]: 
{'dataset': {'id': 'RGF0YXNldDox',
  'project': {'id': 'UHJvamVjdDox'},
  'createdBy': None,
  'filename': None,
  's3Key': None,
  'organization': {'id': 'T3JnYW5pemF0aW9uOjE='}}}

RGF0YXNldDox != 1

jcampbell commented 5 years ago

For documentation's sake: this is a "feature" of relay. We may be able to turn it off ( @roblim ?)

But, e.g., base64.b64decode('RGF0YXNldDox').decode("utf-8").split(":")[1] == 1