How can I create a language independent library using Python?

后端 未结 7 1815
夕颜
夕颜 2021-01-11 10:51

If I create a package in Python, then another Python user can import that package and interface with it.

How can I create a package so that it doesn\'t matter what l

7条回答
  •  没有蜡笔的小新
    2021-01-11 11:15

    Providing an API over a common protocol like http, and with a common format for calls and responses - like a REST service - is probably what you want to do. There are so many resources to help you get started writing a REST Web service with python, like this:

    https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask

    If you want to keep it local to the machine, and provide your python functionality to be used in programs locally, python.org gives you a primer here:

    https://docs.python.org/2/extending/embedding.html

提交回复
热议问题