Skip to content

johnkabler/PyRyx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyRyx

Python + Alteryx

PyRyx is a Python client helper for working with the Alteryx Gallery API.

It includes functions which allow a user to easily use Alteryx Applications as data processing APIs, piping in data and retrieving the results.

Usage

from PyRyx import pyryx
client_key = 'your_client_key_here'
client_secret = 'your_client_secret_here'
gallery_url = 'http://localhost:80/gallery/api/v1/'
ayx = pyryx.PyRyxApi(client_key, client_secret, gallery_url)
ayx.getSubscriptionWorkflows()
[{'fileName': 'Tableau WDC Demo.yxwz',
  'id': '57acaca4065e3f26a82b2615',
  'isChained': False,
  'metaInfo': {'author': '',
   'copyright': '',
   'description': '#tableauwdc',
   'name': 'Tableau WDC Demo',
   'noOutputFilesMessage': '',
   'outputMessage': '',
   'url': '',
   'urlText': ''},
  'packageType': 0,
  'public': False,
  'runCount': 0,
  'runDisabled': False,
  'subscriptionId': '503bac188031af11f8f8e478',
  'uploadDate': '2016-08-11T16:49:40.732Z',
  'version': 1},
 {'fileName': 'Tableau WDC Demo 52.yxwz',
  'id': '57d71458065e3f31e07d96a0',
  'isChained': False,
  'metaInfo': {'author': '',
   'copyright': '',
   'description': '#tableauwdc',
   'name': 'Tableau WDC Demo 52',
   'noOutputFilesMessage': '',
   'outputMessage': '',
   'url': '',
   'urlText': ''},
  'packageType': 0,
  'public': False,
  'runCount': 0,
  'runDisabled': False,
  'subscriptionId': '503bac188031af11f8f8e478',
  'uploadDate': '2016-09-12T20:47:20.414Z',
  'version': 1}]
ayx.getWorkflowQuestions('57acaca4065e3f26a82b2615')
[{'description': 'Select Region',
  'items': [{'key': 'East', 'value': 'East'},
   {'key': 'West', 'value': 'West'}],
  'multiple': 'False',
  'name': 'Select Region',
  'type': 'QuestionListBox'},
 {'description': 'Orders on or after...',
  'name': 'Orders on or after',
  'type': 'QuestionDate'}]
questions_list = ayx.getWorkflowQuestions('57acaca4065e3f26a82b2615')

questions = [{ "name": question['name']} for question in questions_list]

questions[0]['value'] = 'East'    

questions[1]['value'] = '2016-07-10'

question_param = { "questions" : questions }
ayx.executeAndFetchResults('57acaca4065e3f26a82b2615', question_param)
Running
Completed
Date Margin RecordID Region Sales State
0 2016-10-17 17804.6 35 East 30197.6 Alabama
1 2016-08-25 3067.71 104 East 28119.2 Alabama
2 2016-10-02 18371.8 194 East 24885 Alabama
3 2016-10-17 7107.53 249 East 12340.5 Alabama
4 2016-10-08 3599.09 282 East 28586 Alabama
5 2016-09-22 1063.48 303 East 32159.7 Alabama
6 2016-09-10 11311.4 365 East 17891.7 Alabama
7 2016-07-24 7369.75 413 East 24912.2 Alabama
8 2016-09-22 3942.1 448 East 34925.2 Alabama
9 2016-09-09 9349.83 456 East 15435.2 Alabama
10 2016-09-28 6813.12 457 East 14590.9 Alabama
11 2016-07-23 16332.3 541 East 18840.4 Alabama
12 2016-07-11 14735.8 576 East 22774.7 Alabama
13 2016-08-04 29911.7 588 East 36416.6 Alabama
14 2016-08-31 1895.27 614 East 8063.33 Alabama
15 2016-08-30 492.692 628 East 2791.9 Alabama
16 2016-08-08 9788.15 695 East 48614.7 Alabama
17 2016-07-12 27843.5 736 East 29228.1 Alabama
18 2016-09-10 10755.4 755 East 15478.7 Alabama
19 2016-10-09 12843.1 774 East 23501.7 Alabama
20 2016-09-28 2228.32 780 East 36082.4 Alabama
21 2016-09-24 9840.11 789 East 18550.5 Alabama
22 2016-08-23 3420.85 1119 East 8035.69 Alabama
23 2016-09-21 2383.95 1135 East 10437.5 Alabama
24 2016-08-26 7149.62 1187 East 13409.9 Alabama
25 2016-08-25 10939.4 1279 East 18808.5 Alabama
26 2016-08-06 13363.7 1323 East 48917.8 Alabama
27 2016-10-15 22499.8 1359 East 37306.4 Alabama
28 2016-09-08 4982.07 1367 East 5659.37 Alabama
29 2016-10-15 3073.99 1375 East 6763.26 Alabama
... ... ... ... ... ... ...
1068 2016-07-11 24054.2 714 East 49648.7 Wisconsin
1069 2016-08-17 9394.66 725 East 40781.5 Wisconsin
1070 2016-10-03 19196.7 739 East 43374.1 Wisconsin
1071 2016-07-21 2005.85 759 East 31003.8 Wisconsin
1072 2016-09-09 5867.29 767 East 8745.1 Wisconsin
1073 2016-08-28 14032.7 793 East 46950.7 Wisconsin
1074 2016-09-06 18265.6 819 East 28421.7 Wisconsin
1075 2016-08-14 4329.21 865 East 34188.6 Wisconsin
1076 2016-09-29 4615.7 913 East 17847.3 Wisconsin
1077 2016-10-05 432.833 949 East 23058.7 Wisconsin
1078 2016-09-26 12082.3 1022 East 19670 Wisconsin
1079 2016-10-18 5043.43 1148 East 36855.9 Wisconsin
1080 2016-08-27 1007.93 1195 East 8300.48 Wisconsin
1081 2016-07-18 40058.5 1233 East 42945.8 Wisconsin
1082 2016-09-22 19342 1297 East 43092.9 Wisconsin
1083 2016-09-11 34852.9 1417 East 46387.8 Wisconsin
1084 2016-07-27 3039.1 1426 East 3915.7 Wisconsin
1085 2016-07-31 -128.106 1442 East 15710.8 Wisconsin
1086 2016-09-08 2075.26 1571 East 49849.5 Wisconsin
1087 2016-09-27 22062.4 1670 East 24968.3 Wisconsin
1088 2016-07-30 2126.33 1684 East 29597.6 Wisconsin
1089 2016-10-05 33385.3 1691 East 34251 Wisconsin
1090 2016-09-17 2038.66 1779 East 2969.3 Wisconsin
1091 2016-10-14 2213.55 1781 East 11631.7 Wisconsin
1092 2016-07-26 18308.7 1795 East 30394.5 Wisconsin
1093 2016-07-15 5041.6 1810 East 13318.9 Wisconsin
1094 2016-09-30 17063.2 1882 East 35135.4 Wisconsin
1095 2016-07-15 1990.32 1910 East 4927.32 Wisconsin
1096 2016-09-27 32378.4 1947 East 42106.2 Wisconsin
1097 2016-08-02 35421.7 1965 East 49226.6 Wisconsin

1098 rows × 6 columns

About

Python client helper for working with the Alteryx Gallery API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages