Closed alexcasalboni closed 7 years ago
Great work, thanks!
I'll update the test script in the root package.json
to include this command: cd src/python && pip install -r requirements-dev.txt && bash runtests.sh
.
Regarding "global" App Configuration (docs), do you think it's OK to require python users having a package.json
file in their app? Or we may want to discuss other ways to specify App's Config - I don't know if there's something equivalent to package.json
in python. (Currently, we use the name
and dawson
properties.)
Well, that package.json
is basically a dawsonfile :)
I think it could work file for Python users as well.
P.S. as a side-effect of Python's flexibility, the script allows both functions and classes to be used as legit functions entry points (see tests!).
Basically, this
result = myfunction(event, context)
print json.dumps(result)
generates the same output of this (as long as the class is json-serializable):
obj = MyClass(event, context)
print json.dumps(obj)
Is there a legit way of determining a python package name? That's the only required information, and would be a shame to require having a package.json
file just to specify a name field. The "dawsonfile" is against dawson's zero-config principle.
Something like the app folder name - but more robust and consistent.
I have implemented a first version of the main Python script that will parse api.py files. Plus tests.
You can call it from JS like this (sync version):
or like this (async version):
Some stats: