Skip to content

Commit 5e6cf50

Browse files
committedNov 19, 2020
started adding Python template
1 parent ea09603 commit 5e6cf50

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
 

‎otohttp/templates/client.py.plush

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Code generated by oto; DO NOT EDIT.
2+
#
3+
# As you can see fellow developer, this is not ready.
4+
# I don't know how to write a good Python SDK - can you help?
5+
#
6+
# We need to:
7+
#
8+
# 1. Allow users to create a client where they can specify their
9+
# firesearch endpoint. e.g. http://localhost:8888/api
10+
# The client should also take in the Secret API key (string),
11+
# which it will pass as the X-API-Key header.
12+
#
13+
# 2. Allow users to create the instance of each service, passing in
14+
# the client.
15+
#
16+
# 3. Put all the methods on the services, and use the strong types
17+
# for input and output.
18+
#
19+
# 4. Make real HTTP requests inside the methods, parsing all the
20+
# JSON.
21+
22+
import http.client
23+
24+
<%= for (service) in def.Services { %>
25+
// service: <%= service.Name %>
26+
<%= for (method) in service.Methods { %>
27+
// method: <%= method.Name %>
28+
<% } %>
29+
<% } %>

0 commit comments

Comments
 (0)
Please sign in to comment.