Package: jplaw
Python Lemmy API WrapperLike PRAW but for LemmyWritten using theLemmy TS libraryfor reference.Forked from benja810's plawCurrently, most of the API functions are implemented, but there are likely quite a few bugs. It is a bit difficult to test at the moment without spinning up a new instance.If you find any bugs, let me know on theissues pageInstallationjplaw can be installed from PYPI through pip:python -m pip install jplawFrom sourceBuilding can use the script build_and_install:sh ./build_and_install.shOr build and install manually for version {version}:py -m build
py -m pip install ./dist/jplaw-{version}.tar.gzUsage exampleThis example uses python-dotenv to load secrets from the.envfile, which is not strictly necessary.importjplawimportdotenv#Load secrets with dotenvdotenv.load_dotenv()my_instance=os.getenv("LEMMY_INSTANCE")my_username=os.getenv("LEMMY_USERNAME")my_password=os.getenv("LEMMY_PASSWORD")lem=jplaw.Lemmy(my_instance,my_username,my_password)#Print the JSON response from the community listprint(lem.Community.list())#Print the JSON response from getting a specific communityprint(lem.Community.get("test@lemmy.ml"))DocumentationSeethe documentationfor more information on how to use jplaw.RoadmapWork on return types and usability.Work on testing functions and finding / squashing bugsChangelogv0.1.10Fix getting comments (thanks to @notBradPitt)Add Controversial sorting to comments and postsAdd infinite scrolling option to user settingsFix build script issues for non-single digit major/minor versionsAdd Moderator View to listing typeFix federateCommunity indexingv0.1.9Add blur_nsfw and auto_expand parameters to saveUserSettingsAdd moderator_view parameter to Post.list()v0.1.8Fixes Community.edit()Adds Lemmy.federateCommunity()v0.1.7Fix bug with "fixed" boolean valuesv0.1.6Fixes boolean and Enum parametersAdds show_nsfw to communitiesAdd open_links_in_new_tab saveUserSettingsRemoves auth_token parameter from functions. To get an auth_token, a new Lemmy object can be created and logged in with. Accessing other instances via a Lemmy object can be done via the instance parameter, but does not authenticateFix documentation for jplaw.types and jplaw.commentv0.1.5Fix namespace issuesFix build issuesFix missing instance argument in list communitiesv0.1.4Created documentationVersioned documentation for browsing info on previous versions (things will prob change pretty quickly in early releases)AvailablehereFixed some issues with argument types not using enums properly or missing referencesCreated Emoji class for creating, editing and deleting custom emojiv0.1.3Moved enums like SortType to submodule jplaw.typesFix missing enum typesRename a large portion of the functions to remove repetition.Decouples naming scheme from Lemmy APIShortens names and removes repetitive naming like "Lemmy.Comment.likeComment()" -> "Lemmy.Comment.like()."v0.1.2Added majority of the API functions except for image uploadingv0.1.1Getting PyPi package working and added some functionsv0.1Alpha release. After forking from plaw, fork was broken and migrated to this repository from thejplawrepository, as I wanted to do something a little different from having a purely API equivalent library.