-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Present supported API #194
Comments
I've been clear on past issues that we don't consider If you look at how the upload command works, it roughly does:
That said, I've had neither time, nor the inclination to document these because I wouldn't consider them entirely stable APIs. I still have a desire to iterate on them and really no one else has been really asking for much of a stable API. They have accepted that we don't have one and use the internals as they see fit completely accepting that they may see breakage. |
@sigmavirus24 Is there some "high level" API, which an be considered stable? What about e.g. Rational: I need to add support for Implementing this, I found myself re-implementing quite some parts of twine (esp. For example using |
@sigmavirus24 How are you feeling about this and PR #361? Worth keeping open and discussing as a feature request? |
I have some sympathies with the critiques made in #361. In particular, I do agree the "hello world" of a twine API should be short and sweet. A client shouldn't need to orchestrate a series of objects to perform a basic operation. The API should provide sane defaults very similar to how the command-line interface behaves. Ideally, the programmatic API and CLI would both be built on a common foundation, something like 'actions' with 'args' where args have 'defaults'. It seems that the main users requesting this functionality would be satisfied with a simple entry point that exposes the various twine commands via their CLI interface. |
In the feature/commands-api branch, I've drafted the concept where the twine commands are exposed as functions in
I'm not sure if this approach is viable or where it would not be. It surely doesn't provide any high-level abstractions or sophistication around the mechanics of twine; it simply provides a shortcut to the behavior in-process. I did note that for some values of args (e.g. |
@jaraco just because folks are using that out of desperation now doesn't mean we should irrevocably make that the API. It's not something we could walk back and the api you've described is not an API I'd ever want to use as a 3rd party. (Passing in an |
I've pushed that branch to import pkg_resources
def install_commands():
globals().update(
(ep.name, ep.load())
for ep in pkg_resources.iter_entry_points(group='twine.registered_commands')
)
install_commands()
del install_commands |
Zest.releaser uses twine as an API when uploading files to pypi. It calls
upload()
directly. But ece3711, which is in the recent 1.7.x releases, broke the API as there are now two extra mandatory arguments.So...
The text was updated successfully, but these errors were encountered: