Python wrapper for Forgejo API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
spla 566f56ff41
Added response.ok
4 weeks ago
Forgejo.py Added response.ok 4 weeks ago
LICENSE First release 4 weeks ago
README.md First release 4 weeks ago

README.md

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")