Python wrapper for Forgejo API
Anar al arxiu
2023-01-01 15:39:21 +01:00
Forgejo.py Added response.ok 2023-01-01 15:39:21 +01:00
LICENSE First release 2023-01-01 14:36:57 +01:00
README.md First release 2023-01-01 14:36:57 +01:00

Forgejo.py

Python Wrapper for Forgejo API (WIP)

# Sample usage.

from Forgejo import Forgejo

'''
    forgejo = Forgejo()
'''

# It will ask you your Forgejo instance url and your access token to it and save the config to config/forgejo.txt  

# Current implemented Forgejo API endpoints you can call:

forgejo.admin_users_create()  
forgejo.admin_users_list()  
forgejo.notifications_new()
forgejo.repos_get_repo()
forgejo.repos_issues_search()  
forgejo.repos_owner_repo_issues()  
forgejo.repos_owner_repo_issues_comments()  
forgejo.repo_owner_get_metada()
forgejo.repo_owner_create_file()
forgejo.repo_owner_update_file()
forgejo.repo_owner_delete_file()
forgejo.user()

Some of above methods will need required params that will be shown to you when running them. In ex.:  

forgejo.repos_issues_search()
*** TypeError: repos_issues_search() missing 1 required positional argument: 'owner'  

Just pass the param to the object like this:  

forgejo.repos_issues_search("your_forgejo_username")