gopythongo / aptly-api-client Goto Github PK
View Code? Open in Web Editor NEWA Python 3 API client for aptly
License: BSD 3-Clause "New" or "Revised" License
A Python 3 API client for aptly
License: BSD 3-Clause "New" or "Revised" License
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 >=
.
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 ;)
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']" ?
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...?
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?
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.