-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
executable file
·50 lines (39 loc) · 1.3 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
"""Test script which demos module functionality."""
import os
import sys
# from bits.auth import Auth
# from bits.settings import Settings
# add bitsapiclient to the path
mypath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(mypath, "bits"))
# sys.path.append(os.path.join(mypath, "bits-api-python-client"))
from bits.appengine import AppEngine # noqa
from bits.appengine.endpoints import Endpoints # noqa
# debug_user = {
# 'email': '[email protected]',
# 'id': '111375498507364395026',
# }
# settings = Settings().get()
# auth = Auth(settings)
def main():
"""Execute the main function."""
# appengine = AppEngine()
# users = appengine.user().get_stored_users()
# print('Users: {}'.format(len(users)))
# return
client = Endpoints.Client(
api="bitsdb",
api_key="****",
base_url="https://broad-bitsdb-api.appspot.com",
version="v1",
verbose=True,
)
# client = auth.bitsdbapi()
people = client.service.people().list(limit=1000).execute().get("items", [])
# people = request.execute().get('items', [])
print(f"People: {len(people)}")
# print(people)
# print(client.service.buildings().list().execute().get('items', []))
if __name__ == "__main__":
main()