Saravanan666/pypi-org huggingface dataset:
Package: dpy-init
dpy-initdpy-init is a Python library which will instantly setupInstallationUse the package managerpipto install dpy-init.pipinstalldpy-initUsagedpy-initAfter typing in the command above, It will ask you which library you would like to use. After selecting a library, It will ask you which commands type you would like to use. After selecting that, Yourmain.pyfile is created!About the AuthorThe author, Me. Is a Python Developer and a Discord Bot creator. Reach out to me on discordby clicking hereEnjoy the library!
Package: dpylint
dpylintAn pylint extension for linting discord.pyExplore the docs »View Demo·Report Bug·Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationUsageRoadmapContributingLicenseContactAcknowledgementsAbout The Projectdpylint is a pylint extension that lints python code written for a discord botFor a demo seedemo.mdBuilt WithpythonpylintGetting StartedTo install dpylint:PrerequisitesYou'll need to havepythonandpylintinstalled in order to use the extensionInstallationInstalling via pipDirectly installing via pip (Recommended)pipinstalldpylintInstalling using pip and gitpipinstallgit+https://github.com/wasi-master/dpylint.gitCloning then installingClone the repogitclonehttps://github.com/wasi-master/dpylint.gitInstall using pippipinstall.UsageCreate a new file called.pylintrcand add this to that file[MASTER]load-plugins=dpylintFor more examples such as vscode installation, usage without pylintrc file, please refer to theDocumentationRoadmapSee thetodo listfor a list of features yet to be added(and known issues).
Also see theopen issuesissues.ContributingContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make aregreatly appreciated.Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactProject Link:https://github.com/wasi-master/dpylintDiscord:Wasi Master#6969Email:arianmollik323@gmail.comAcknowledgementsCyrus from the official discord.py serverFor the event checking ideaGnome from the official discord.py serverFor the idea to check for aliases. e.g. ctx.channel.send instead of ctx.sendproguy (bobo yoda) from the official discord.py serverFor the idea to check for client instead of botHay (Kekka)For the idea to check for misleading variable names for discord.User and discord.Member
Package: dpymenus
Discord MenusSimplified menus for discord.py developers.Table of ContentsThe BookAPI DocsExamplesFeaturesQuick StartExampleSupportContributingFeaturesdpymenusis an unofficial add-on for thediscord.pylibrary that lets you quickly compose various styles of menus
which react to user input.Handles text & button input, normalization, and validationEasy-to-build menus with paginated data, multiple choices, and pollsTemplate system for quickly defining a cohesive style for your menusUser-defined callbacks & event hooks for complex use-casesAwesome examples and documentation to get rolling quicklyQuick Startpip install dpymenusRead"Installation"fromThe Bookfor further information.Examplesfromdiscord.extimportcommandsfromdpymenusimportPage,PaginatedMenuclassDemo(commands.Cog):def__init__(self,client):self.client=client@commands.command()asyncdefdemo(self,ctx:commands.Context):page1=Page(title='Page 1',description='First page test!')page1.add_field(name='Example A',value='Example B')page2=Page(title='Page 2',description='Second page test!')page2.add_field(name='Example C',value='Example D')page3=Page(title='Page 3',description='Third page test!')page3.add_field(name='Example E',value='Example F')menu=PaginatedMenu(ctx)menu.add_pages([page1,page2,page3])awaitmenu.open()defsetup(client):client.add_cog(Demo(client))Theexamples directorycontains working examples for
almost every feature of the library.In addition, the chapter on"Examples"walks you through setting up the built-in example runner.SupportIf you are looking for support on how to use particular library functions, please ask in thediscussionstab.If you've encountered a bug,submit an issue.In addition, feel free to add me on Discord @Rob (롭)#0013-- I am open to discuss the library and assist when I am
free, but I prefer you use the GitHub options as it may help other people as well.Contributingdpymenusis open-source for a reason -- I welcome all additions, bug fixes, and changes if they fit within the scope
of the library. Please see the chapter on"Contributing"in the book for detailed information. Don't be shy!Have you found this library useful? Please leave a ⭐ on the project -- it means a lot to me!Check out my other discord.py utility:cogwatch-- Automatic
hot-reloading for your discord.py command files.
Package: dpypeline
dpypelineProgram for creating data pipelines triggered by file creation events.Version0.1.0-beta.4Python enviroment setupTo utilise this package, it should be installed within a dedicated Conda environment. You can create this environment using the following command:conda create --name <environment_name> python=3.10To activate the conda environment use:conda activate <environment_name>Alternatively, usevirtualenvto setup and activate the environment:python -m venv <environment_name>
source <envionment_name>/bin/activateInstallationClone the repository:git clone git@github.com:NOC-OI/dpyepline.gitNavigate to the package directory:After cloning the repository, navigate to the root directory of the package.Install in editable mode:To installdpypelinein editable mode, execute the following comman from the root directory:pip install -e .This command will install the library in editable mode, allowing you to make changes to the code if needed.Alternative installation methods:Install from the GitHub repository directly:pip install git+https://github.com/NOC-OI/dpypeline.git@main#egg=dpypelineInstall from the PyPI repository:pip install dpypelineUnit testsRun tests usingpytestin the main directory:pip install pytest
pytestExamplesPython scriptsExamples of Python scripts explaining how to use this package can be found in the examples directory.Command line interface (CLI)The CLI provided by this package allows you to execute data pipelines defined in YAML files; however, it offers less flexibility compared to using the Python scripts. To run the dpypeline CLI, type, e.g., the following command:dpypeline-i<input_file>>output2>errorsFlags description-hor--help: show an help message-i INPUT_FILEor--input INPUT_FILE: Filepath to the pipeline YAML file (by defaultpipelien.yaml)-vor--version: show dpypeline's version umberEnvironment variablesThere are a few environment variables that need to be set so that the application can run correctly:CACHE_DIR: Path to the cache directory.Software Workflow OverviewPipeline architecturesThread-based pipelineIn the thread-based pipeline,Akitaenqueues events into an in-memory queue. These events are subsequently consumed byConsumerSerial, which generates jobs for sequential execution within theThreadPipeline(an alias forBasicPipeline).Parallel pipelineIn the parallel pipeline,Akitaenqueues events into an in-memory queue. These events are then consumed byConsumerParallel, which generates futures that are executed concurrently by multiple Dask workers.
Package: dpy-peper
English/Japanesepeperpeper = dpy-voice-helperA wrapper of discord.py's on_voice_state_update.How to usepython3 -m pip install dpy-peperUse as extensionLoad withload_extension.fromdiscord.extimportcommandsbot=commands.Bot(command_prefix='/')bot.load_extension('dpy_peper')# or# bot.load_extension('discord.ext.peper')bot.run("Th1sIsN0tT0k3n.B3cause.1fiShowB0tWillG3tH4cked")Use as cogImportVoiceWrapperfrom module.fromdiscord.extimportcommandsfromdpy_peperimportVoiceWrapper# or# from discord.ext.peper import VoiceWrapperbot=commands.Bot(command_prefix='/')bot.add_cog(VoiceWrapper(bot))bot.run("Th1sIsN0tT0k3n.B3cause.1fiShowB0tWillG3tH4cked")EventsNameDescriptionArgumentsvoice_channel_updatefires on when someone connected/moved/disconnected VC.member, before_channel, after_channelvoice_channel_connectfires on when someone connected VC.member, channelvoice_channel_movefires on when someone moved VC.member, before_channel, after_channelvoice_channel_disconnectfires on when someone disconnected VC.member, channelvoice_channel_afkfires on when someone connected AFK VC.member, before_channelvoice_channel_alonefires on when someone disconnected VC and only 1 user is remaining.member, channelvoice_mute_updatefires on when someone enabled/disabled self-mute/guild-mute.membervoice_mute_enablefires on when someone enabled self-mute/guild-mute.membervoice_mute_disablefires on when someone disabled self-mute/guild-mute.membervoice_self_mute_updatefires on when someone self-muted/self-unmuted.membervoice_self_mute_enablefires on when someone enabled self-mute.membervoice_self_mute_disablefires on when someone disabled self-mute.membervoice_guild_mute_updatefires on when someone guild-muted/guild-unmuted.membervoice_guild_mute_enablefires on when someone enabled guild-mute.membervoice_guild_mute_disablefires on when someone disabled guild-mute.membervoice_deaf_updatefires on when someone enabled/disabled self-deaf/guild-deaf.membervoice_deaf_enablefires on when someone enabled self-mute/guild-mute.membervoice_deaf_disablefires on when someone disabled self-mute/guild-mute.membervoice_self_deaf_updatefires on when someone enabled/disabled self-deaf.membervoice_self_deaf_enablefires on when someone enabled self-deaf.membervoice_self_deaf_disablefires on when someone disabled self-deaf.membervoice_guild_deaf_updatefires on when someone enabled/disabled guild-deaf.membervoice_guild_deaf_enablefires on when someone enabled guild-deaf.membervoice_guild_deaf_disablefires on when someone disabled guild-deaf.membervoice_stream_updatefires on when someone started/ended stream.membervoice_stream_startfires on when someone started stream.membervoice_stream_endfires on when someone ended stream.membervoice_video_updatefires on when someone started/ended video.membervoice_video_startfires on when someone started video.membervoice_video_endfires on when someone ended video.memberSuffixes(event)_me: when client did. member argument will be ignored.(event)_bot: when bot did.(event)_other_bot: when bot did(without client).(event)_user: when user did(not bot).
Package: dpypx
DPYPXA simple wrapper aroundPython Discord Pixels.Requires Python 3.7+ (3.x where x >= 7).Requirespillowandaiohttpfrom pip.Exampleimportdpypx# Create a client with your token.client=dpypx.Client('my-auth-token')# Download and save the canvas.canvas=awaitclient.get_canvas()canvas.save('canvas.png')# And access pixels from it.print(canvas[4,10])# Or just fetch specific pixels.print(awaitclient.get_pixel(4,10))# Draw a pixel.awaitclient.put_pixel(50,10,'cyan')awaitclient.put_pixel(1,5,dpypx.Colour.BLURPLE)awaitclient.put_pixel(100,4,'93FF00')awaitclient.put_pixel(44,0,0xFF0000)# Swap two pixels.awaitclient.swap_pixels((55,1),(50,3))# Close the connection.awaitclient.close()Auto-drawLoad an image:fromPILimportImageim=Image.open('pretty.png')ad=dpypx.AutoDrawer.load_image(client,(5,40),im,scale=0.1)awaitad.draw()To prefer fixing existing pixels to placing new ones:awaitad.draw_and_fix()By default, this will also loop forever. To exit once the whole image is
correct:awaitad.draw_and_fix(forever=False)You can also manually specify each pixel:ad=dpypx.AutoDrawer.load(client,'''0032ff000000ff000000ffff000000ff000000ff''')awaitad.draw()Format of the drawing plan:Leftmost X coordinateTopmost Y coordinateWidthHeightEach pixel, left-to-right, top-to-bottom.Auto-draw will avoid colouring already correct pixels, for efficiency.LoggingTo see logs:importlogginglogging.basicConfig(level=logging.INFO)Too see more logs:logging.basicConfig(level=logging.DEBUG)To see fewer logs:logging.basicConfig(level=logging.WARNING)
Package: dpyrandmeme
dpyrandmeme: random memes for discord.pyWhat does the library do?This library simply uses aiohttp to collect json data from a reddit page and turns it into a link inorder to be used while also storing the memes and returning the meme as a discord embed before sending back to the discord bot to send to the member who sent that command. It is the same meme library that is currently being used inside Paradigm.PyPi library link:https://pypi.org/project/dpyrandmeme/USAGE OF CODE IN A DISCORD SLASH COMMAND COG:"""This snippet is the actual meme slash command code from the Paradigm Source Code."""fromdiscord.extimportcommandsfromdpyrandmemeimportpyrandmemeclassMeme(commands.Cog):def__init__(self,client):self.client=client@commands.hybrid_command()@commands.cooldown(1,1,commands.BucketType.user)asyncdefmeme(self,ctx):"""Get some random memes from reddit."""awaitctx.send(embed=awaitpyrandmeme())asyncdefsetup(client):awaitclient.add_cog(Meme(client))**Credits:**d33pak123:https://github.com/d33pak123/Pyrandmeme-python-library,Microsoft for the template.©2023 aviance. Project is open-source through the MIT License.
Package: dpyrocketmq
The Python Implementation of Apache RocketMQ ClientEnglish |简体中文|RocketMQ WebsiteOverviewHere is the Python implementation of the client forApache RocketMQ. Different from theremoting-based client, the current implementation is based on separating architecture for computing and storage, which is the more recommended way to access the RocketMQ service.Here are some preparations you may need to know (or refer tohere).Python 3.7 is the minimum version required, Python 3.10 is the recommended version.Setup namesrv, broker, andproxy.Getting StartedWe are using Poetry as the dependency management & publishing tool. You can find out more details about Poetry from itswebsite. Here is the related command of Poetry you may use for development.# Create a virtual environment and activate it.poetryenvusepython3# Installs the project dependencies.poetryinstall# Spawns a shell within the virtual environment.poetryshellWe use pytest as the testing framework for the current project, and you can executepytestdirectly to run all tests.Publishing StepsWe utilize PyPI to help users easily introduce and use the Python client in their projects. To publish a package to PyPI, please register an account in advance, then execute the following command.# Builds a package, as a tarball and a wheel by default.poetrybuild# Publishes a package to a remote repository.poetrypublish-uusername-ppasswordCurrent ProgressProtocol layer code generation is completed.Partial completion ofrpc_client.py.
Package: dpyslash
PyslashPyslash is a wrapper arounddiscord-py-slash-command, that makes command creation more natural.The examples provided are based of the examples from the original repository.Quick startupFirstly you must install the package, as explainedhere.A simple setup usingslashand adding a basic command.importdiscordfromdiscord.extimportcommandsfrompyslashimportSlashCommand,SlashContextbot=commands.Bot(command_prefix="!",intents=discord.Intents.all())s=SlashCommand(bot)@s.slash(name="test")asyncdef_test(ctx:SlashContext,arg0:str):embed=discord.Embed(title="embed test")awaitctx.send(content=arg0,embeds=[embed])bot.run("discord_token")As of1.1.0, you no longer need to importslashfrompyslashand provide the instance as the first variable, as pyslash now has a subclass ofSlashCommandthat does this for you.Converters are automatically handled, for example@s.slash(name="test")asyncdef_test(ctx:SlashContext,member:discord.Member):awaitctx.send(f"*taps mic* testing,{member.mention}")And names don't have to be given@s.slash()asyncdeffoo(ctx:SlashContext,member:discord.Member):# This command will automatically be called 'foo'awaitctx.send(f"Hello,{member.mention}")DescriptionsBy default, each argument and command has the descriptionNo description, but that can be changed by providing a docstring. Docstrings are supported as provided bydocstring-parser—at time of writing, that isReST,Google, andNumpydoc.fromtypingimportTuple,Literal# ...@s.slash()asyncdeffoo(ctx:SlashContext,member:discord.Member):"""My command description here!:param member: my description here"""# This command will automatically be called 'foo', and have the description# "My command description here!", and the argument `member` will have the# description "my description here".awaitctx.send(f"Hello,{member.mention}")It's also possible to pass the command description through the decorator as follows, although that's not recommended (and will override any docstring provided description):@s.slash(description="My description!")asyncdefcommand(ctx):passAdvanced usageThe same usage applies for cogs, but a different function is used.# bot.pyfromdiscord.extimportcommandsfrompyslashimportSlashCommandbot=commands.Bot(command_prefix="prefix")slash=SlashCommand(bot,override_type=True)bot.load_extension("cog")bot.run("TOKEN")# cog.pyimportdiscordfromdiscord.extimportcommandsfrompyslashimportSlashContext,slash_cogclassSlash(commands.Cog):def__init__(self,bot):self.bot=bot@slash_cog(name="test")asyncdef_test(self,ctx:SlashContext):awaitctx.send("Hey there folks")defsetup(bot):bot.add_cog(Slash(bot))InstallationTo install from pip, runpip install dpyslashTo install from source, clone the repository and then build:git clone https://github.com/starsflower/discordpy-slash-commands.git
cd discordpy-slash-commands
python setup.py installTestsTo run basic tests, runpython -m tests/testTo run the test bot (that requiresBOT_TOKENin the environment variables), and a further pip requirement ofpython-dotenvpython -m tests/test_bot
Package: dpy-slash-button-paginator
Button PaginatorWith discord-py-slash-commandButton paginator using discord_slashWelcome!It's a paginator for discord-py-slash-command!
Thanks to the original creators khk4912 (khk4912 /EZPaginator) and decave27 (decave27/ButtonPaginator)!This project is open source ⭐, feel free to take inspiration from the codeThe library being used has anofficial discord server, so if you have a question about how it works, feel free to ask it on this server.Installpip install --upgrade dpy-slash-button-paginatorExamplefromButtonPaginatorimportPaginatorfromdiscord.extimportcommandsfromdiscord_slashimportSlashCommandimportdiscordbot=commands.Bot("your prefix")slash=SlashCommand(bot)@bot.eventasyncdefon_ready():print(f"Logged in as{bot.user}!")@bot.command()asyncdefbutton(ctx):embeds=[discord.Embed(title="Page1"),discord.Embed(title="Page3"),discord.Embed(title="Page3")]contents=["Text 1","Text2","Text3"]e=Paginator(bot=bot,ctx=ctx,header="An example paginator",embeds=embeds,contents=contents,only=ctx.author)awaite.start()bot.run("your token")LicenseThis project is under the MIT License.ContributeAnyone can contribute to this by forking the repository, making a change, and create a pull request!But you have to follow these to PR.Use the black formatter.Useconventional commits.Test.Thanks tokhk4912- Original Paginator developerdecave27- Creator of the discord-components paginator that this was based onLordOfPolls, fl0w, eunwoo, and everyone else who works on thediscord-py-slash-command lib
Package: dpy-slash-ext
slash-extYet another slash command lib made for discord.py, except this one intergrates will intergrate withdiscord.ext, thus making it a lot easier to use. Some resources are provided too, such as theINTERACTION_CREATEsocket response. This is provided in thedebug.jsonfile. I do not mind sharing this token as its invalid.Example:importdiscordfromdiscord.extimportcommands,slashfromdiscord.ext.slash.abcimportSlashContextbot=commands.Bot(command_prefix="!",case_insensitive=True)slashParent=slash.SlashBot(bot,"<bot token>",770301542170361896)#<= Bot User ID@bot.eventasyncdefon_ready():print("Ready!")@slashParent.slash_command(name="rachel",description="hola",guild_ids=[830418497837203457])#make sure to not have names with spaces in them as discord will not create them.asyncdefdummy(ctx:SlashContext):embeds=[discord.Embed(title="Hello World")]awaitctx.send(content="Hello World",embeds=embeds)awaitctx.edit(content="Hello Discord")@bot.eventasyncdefon_slash_recieve(payload):#=> event that is fired when a slash command is fired and it is found in the bot's cacheprint("RECEIEVED SLASH")print(payload)bot.run("<bot token>")We give you the option to pass in the bot token and bot user id because you cannot access thetokenandidbefore the bot is ready.
If you have any questions, please DM me on Discord: moonie#6598
Package: dpy-syntaxer
dpy-syntaxerSyntax maker for discord.py's command.How to usepython3 -m pip install dpy-syntaxerfromtypingimportOptionalfromdiscord.extimportcommands,syntaxer@commands.command()asyncdefcommand(ctx,arg1:Optional[int],arg2,*,arg3):"""Command descriptionarg_first: Description of arg1arg_second: Description of arg2arg_third: Description of arg3"""passsyntax=syntaxer.Syntax(command)str(syntax)# => 'command <arg_first> <arg_second> <arg_third'syntax[0]# => CommandName(name='command', parent=None)syntax[1]# => CommandArgument(name='arg_first', required=False, description='Description of arg1', format='[arg_first]', flag=<ArgumentType.optional: 2>, default=<class 'inspect._empty'>)syntax[2]# => CommandArgument(name='arg_second', required=True, description='Description of arg2', format='<arg_second>', flag=<ArgumentType.required: 1>, default=None)syntax[3]# => CommandArgument(name='arg_third', required=True, description='Description of arg3', format='<arg_third', flag=<ArgumentType.kwarg|required: 9>, default=None)Please read thedocumentationfor more information.