![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black
.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white :target: https://github.com/pre-commit/pre-commit :alt: pre-commit
.. image:: https://readthedocs.org/projects/gidgetlab/badge/?version=latest :target: https://gidgetlab.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
.. image:: https://gitlab.com/beenje/gidgetlab/badges/master/pipeline.svg
.. image:: https://gitlab.com/beenje/gidgetlab/badges/master/coverage.svg
An asynchronous GitLab API
_ library.
This library is based on gidgethub_ from Brett Cannon, an async GitHub API library.
I liked the concept with the asynchronous and sans-I/O
_
approach and decided to adapt it to the GitLab's API.
All credit to Brett Cannon <https://github.com/brettcannon/>
_ for the initial library!
Here is a complete example of a server that responds to webhooks which will greet the author and say thanks whenever an issue is opened::
from gidgetlab.aiohttp import GitLabBot
bot = GitLabBot("beenje")
@bot.router.register("Issue Hook", action="open")
async def issue_opened_event(event, gl, *args, **kwargs):
"""Whenever an issue is opened, greet the author and say thanks."""
url = f"/projects/{event.project_id}/issues/{event.object_attributes['iid']}/notes"
message = f"Thanks for the report @{event.data['user']['username']}! I will look into it ASAP! (I'm a bot)."
await gl.post(url, data={"body": message})
if __name__ == "__main__":
bot.run()
Gidgetlab is available on PyPI <https://pypi.org/project/gidgetlab/>
_.
::
python3 -m pip install gidgetlab
To install web server support (e.g. for aiohttp
, treq
, or tornado
), specify it as an extra dependency:
::
python3 -m pip install gidgetlab[aiohttp]
Note that the library is still in alpha development stage.
The key goal is the same as gidgethub_ (but for GitLab):
to provide an async base library for the GitLab API
_
which performs no I/O of its own (a sans-I/O
_ library).
Another goal is to easily write GitLab bots: applications that
run automation on GitLab, using GitLab WebHooks and API.
This was inspired by Mariatta <https://github.com/Mariatta>
_ PyCon 2018 workshop:
Build-a-GitHub-Bot Workshop <http://github-bot-tutorial.readthedocs.io/en/latest/index.html>
_.
If you think you want a different approach to the GitLab API,
GitLab maintains a list of libraries <https://docs.gitlab.com/ee/api/rest/#third-party-clients>
_.
.. _gidgethub: https://github.com/brettcannon/gidgethub
.. _GitLab API
: https://docs.gitlab.com/ce/api/
.. _sans-I/O
: https://sans-io.readthedocs.io/
FAQs
An async GitLab API library
We found that gidgetlab demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.