GithubHelp home page GithubHelp logo

gopythongo / aptly-api-client Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 16.0 170 KB

A Python 3 API client for aptly

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
aptly aptly-server aptly-api python3

aptly-api-client's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aptly-api-client's Issues

About the dependencies pinning

Hello,

Before opening a PR I am starting the discussion here :).
Would you be open to the removal of the strict pinning in the setup.py and the requirements-test.txt?

aptly-api-client is a library not an application, so it's going to be include inside other project, but if this project must pin a dependencies there is going to have a conflict.
If for whatever reason you are not confortable removing the pinning we can loosen it by replacing == with >=.

method list() in SnapshotAPISection doesn't use sort argument

Hi there again :)
I noticed that method def list(self, sort: str = 'name') doesn't use sort argument at all in the code:

    def list(self, sort: str = 'name') -> Sequence[Snapshot]:
        if sort not in ['name', 'time']:
            raise AptlyAPIException("Snapshot LIST only supports two sort modes: 'name' and 'time'. %s is not "
                                    "supported." % sort)
        resp = self.do_get("api/snapshots")
        ret = []
        for rsnap in resp.json():
            ret.append(self.snapshot_from_response(rsnap))
        return ret

See code here.
I can create a pull request to fix it if you want ;)

[Question] How to add multiple architectures into same repository?

Hi,

If looking at the Aptly itself it supports the following:

$ aptly repo add -architectures="amd64" <search dir for amd64 .deb packages>
$ aptly repo add -architectures="arm64" <search dir for arm64 .deb packages>

There is no such option available when using e.g. this flow:

from aptly_api import Client
aptly = Client("http://aptly-endpoint.test/")

aptly.repos.create("myrepo", comment="a test repo",
                   default_distribution="mydist",
                   default_component="main")

aptly.files.upload("test_folder", "/tmp/mypkg_1.0_amd64.deb")

aptly.repos.add_uploaded_file("myrepo", "test_folder")

The publish api does provive the "architectures" support:

    def publish(self, *, source_kind: str = "local",
                sources: Sequence[Dict[str, str]],
                architectures: Sequence[str],
                ....

Does it achieve the same result if I'm adding both amd64 and arm64 .deb packages via "aptly.files.upload" and "aptly.repos.add_uploaded_file" and upon publishing a snapshot I pass "architectures=['amd64', 'arm64']" ?

[Question] Contributing to the project

Hello,
I would like to contribute to that project or at least to try to. Can you please share if you have any specific requirements or guidelines to follow? What is exact process to contribute... make suggestion, create branch , PR etc...?

How to make snapshot from mirror?

Hello,
As per AptlyAPI documentation snapshot from mirrors should be possible but as far as I can see there is no such possibility in "aptly-api-client" module. Am I missing something or it is not implemented?

sign_gpgkey shouldn't be required when creating/updating publish

Hi all,
Actually I'm not sure whether the reported 'thing' is bug or feature so bear with me :)
By the way I started to use your lib and it looks good thx.

I'm kind of confuse when publishing snapshot or updating existing one.
There is required option sign_gpgkey for package signing, it cannot be empty, but I think it shouldn't be required. Functions in question def publish, def update on object PublishAPISection.

When I published snapshot via command-line with curl without gpg key the aptly signs the publish with default gpg key which is stored locally. Therefore the lib should allow it as well. If you agree I can prepare diff.

P.S.: There can be passed argument sign_skip to functions. It will lead to not signing the publish.

Please let me if you require further information.

Using a custom timeout to reach the aptly API

Hello,

Is it possible today to specify a custom timeout to reach the aptly API ?
I saw in the function BaseAPIClient than there is a timeout parameter.
But not in Client class, is-it normal ?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.