Python mini packages

  • Thread starter Deleted member 43669
  • Start date
Status
Not open for further replies.
D

Deleted member 43669

Guest
So we produce a complex Python web app at work. It exposes a REST interface.

We want to provide third parties with a Python REST client for the API, so that they can use the API from Python easily.

The client is really lightweight code- it's much less code than the complete set of artifacts we need to generate to package a library (setup.py, pytest.ini, tox.ini, Sphinx stuff, so on and so forth), so it seems somewhat backwards to produce a library which has more "overhead" than code.

Do we have any alternatives? I was thinking that it might be interesting to have a secondary setup.py which just dists the client code, but keep it within the main project- using the same doc/testing/etc. infrastructure but generating a second, lighter, artifact).

Another option would be to reduce the boilerplate for each project- but we haven't found a satisfactory approach for that.
 

Alamout

Ars Legatus Legionis
27,285
Maybe I don't understand the app/client dynamic here, but they sound like separate projects to me. Using a REST interface should mean that the client can be written in anything--you guys choose Python because you like it, but it's just one option. The Python "package" to interact with a REST API should be one file and a README.

Of course you want them to remain compatible, but you shouldn't be changing your REST API often.
 
Status
Not open for further replies.