Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
A simple python library for interacting with the ARGO Messaging Service.
The Messaging Services is implemented as a Publish/Subscribe Service. Instead of focusing on a single Messaging API specification for handling the logic of publishing/subscribing to the broker network the API focuses on creating nodes of Publishers and Subscribers as a Service.
In the Publish/Subscribe paradigm, Publishers are users/systems that can send messages to named-channels called Topics. Subscribers are users/systems that create Subscriptions to specific topics and receive messages.
You may find more information about the ARGO Messaging Service documentation
Library is tested and should work with Python versions 2.7, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 running on CentOS 7, Rocky 8 and Rocky 9 releases.
RPM packages are prepared for CentOS and Rocky releases and you may find it and download it from ARGO Repository. PyPI packages are prepared as well.
RPM production packages:
RPM devel packages:
PyPI package:
https://pypi.org/project/argo-ams-library/
The AMS library uses a valid AMS token to execute requests against the AMS cluster. This token can be provided with 2 ways:
from argo_ams_library import ArgoMessagingService
ams = ArgoMessagingService(endpoint="ams_endpoint", project="ams_project", token="your_ams_token")
from argo_ams_library import ArgoMessagingService
ams = ArgoMessagingService(endpoint="ams_endpoint", project="ams_project", cert="/path/to/cert", key="/path/to/cert/key")
The library will use the provided certificate to access the corresponding ams token through the ARGO Authentication Service and then set the ams object's token field with the retrieved token.
In the folder examples
, you may find examples of using the library:
examples/publish.py
)examples/consume-pull.py
)examples/retry.py
)This example explains how to publish messages in a topic with the use of the library. Topics are resources that can hold messages. Publishers (users/systems) can create topics on demand and name them (Usually with names that make sense and express the class of messages delivered in the topic). A topic name must be scoped to a project.
You may find more information about Topics in the ARGO Messaging Service documentation
publish.py --host=[the FQDN of AMS Service]
--token=[the user token]
--project=[the name of your project registered in AMS Service]
--topic=[the topic to publish your messages]
This example explains how to consume messages from a predefined subscription with the use of the library. A subscription is a named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application. A subscription name must be scoped to a project. In pull delivery, your subscriber application initiates requests to the Pub/Sub server to retrieve messages. When you create a subscription, the system establishes a sync point. That is, your subscriber is guaranteed to receive any message published after this point. Messages published before the sync point may not be delivered.
You may find more information about Subscriptions in the ARGO Messaging Service documentation
consume-pull.py --host=[the FQDN of AMS Service]
--token=[the user token]
--project=[the name of your project registered in AMS Service]
--topic=[the topic from where the messages are delivered ]
--subscription=[the subscription name to pull the messages]
--nummsgs=[the num of messages to consume]
Library has self-implemented HTTP request retry ability to seamlesssly interact with the ARGO Messaging service. Specifically, requests will be retried in case of:
408
) or load balancer (HTTP 408
and 504
)502
, 503
It has two modes: static sleep and backoff. Examples are given in the in examples/retry.py
.
FAQs
A simple python library for interacting with the ARGO Messaging Service
We found that argo-ams-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.