FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
astro-api-python-client/test.py at v-1.0.0 · astrologyapi/astro-api-python-client · GitHub
astrologyapi
/
astro-api-python-client
Public
Notifications
You must be signed in to change notification settings
Fork
9
Star
9
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
astro-api-python-client
/
test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (28 loc) · 884 Bytes
Breadcrumbs
astro-api-python-client
/
test.py
Copy path
File metadata and controls
38 lines (28 loc) · 884 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
from
dotenv
import
load_dotenv
import
os
from
sdk
import
AstrologyAPIClient
import
json
# Load environment variables from .env file
load_dotenv
()
userID
=
os
.
getenv
(
'ASTROLOGY_API_USER_ID'
)
apiKey
=
os
.
getenv
(
'ASTROLOGY_API_KEY'
)
# make some dummy data in order to call astrology api
data
=
{
'date'
:
10
,
'month'
:
12
,
'year'
:
1993
,
'hour'
:
1
,
'minute'
:
25
,
'latitude'
:
25
,
'longitude'
:
82
,
'timezone'
:
5.5
}
# api name which is to be called
resource
=
"astro_details"
# instantiate AstrologyAPIClient class
client
=
AstrologyAPIClient
(
userID
,
apiKey
)
# call horoscope apis
responseData
=
client
.
call
(
resource
,
data
[
'date'
],
data
[
'month'
],
data
[
'year'
],
data
[
'hour'
],
data
[
'minute'
],
data
[
'latitude'
],
data
[
'longitude'
],
data
[
'timezone'
])
print
(
responseData
)
# <== prints json response.
#prints a single key
print
(
responseData
[
'ascendant'
])
Back
|
FazBrowse Home
|
New Git URL