Saravanan666/pypi-org huggingface dataset:
Package: nextcord
NextcordA modern, easy-to-use, feature-rich, and async-ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawaitProper rate limit handlingOptimised in both speed and memoryInstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Unextcord# Windowspy-3-mpipinstall-UnextcordOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"nextcord[voice]"# Windowspy-3-mpipinstall-Unextcord[voice]To install additional packages for speedup, run the following command:# Linux/macOSpython3-mpipinstall-U"nextcord[speed]"# Windowspy-3-mpipinstall-Unextcord[speed]To install the development version, do the following:$gitclonehttps://github.com/nextcord/nextcord/$cdnextcord$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)aiodns,Brotli,cchardet(for aiohttp speedup)orjson(for json speedup)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.8-devfor Python 3.8)Quick Exampleimportnextcordfromnextcord.extimportcommandsbot=commands.Bot()@bot.slash_command(description="Replies with pong!")asyncdefping(interaction:nextcord.Interaction):awaitinteraction.send("Pong!",ephemeral=True)bot.run("token")You can find more examples in theexamples directory.NOTE:It is not advised to leave your token directly in your code, as it allows anyone with it to access your bot. If you intend to make your code public you shouldstore it securely.LinksDocumentationOfficial Discord ServerDiscord Developers Server
Package: nextcord-ext-activities
nextcord-ext-activities|PyPi|Docs|Support server|GitHub repo|nextcord.ext.activities is an extension that helps you to launch activities on Discord.Quick exampleimportnextcordfromnextcord.extimportactivities,commandsbot=commands.Bot(command_prefix="$")@bot.eventasyncdefon_ready():print(f"Logged in as{str(bot.user)}(ID{bot.user.id})")@bot.command()asyncdefpoker(ctx,channel:nextcord.VoiceChannel):invite_link=awaitchannel.create_activity_invite(activities.Activity.poker)awaitctx.send(invite_link.url)@bot.command()asyncdefbetrayal(ctx,channel:nextcord.VoiceChannel):invite_link=awaitchannel.create_activity_invite(activities.Activity.betrayal)awaitctx.send(invite_link.url)bot.run("token here")You can find more example in theexample directory.
Package: nextcord-ext-events
Custom events derived from events dispatched by Discord.⚠️ Work In Progress!InstallationThis extension is currently not in PyPI.$python3-mpipinstall-Ugit+https://github.com/vincentrps/nextcord-ext-eventsUsageAn example for when subscribing to the on_member_kick event.importnextcordfromnextcord.extimportcommands,eventsfromnextcord.ext.eventsimportmember_kickclassMyBot(commands.Bot,events.EventsMixin):asyncdefon_ready(self):print('Logged in!')asyncdefon_member_kick(self,member:nextcord.Member,entry:nextcord.AuditLogEntry):print(f'{member}was kicked from{member.guild}!')bot=MyBot(command_prefix='!',intents=nextcord.Intents.all())bot.run("TOKEN")
Package: nextcord-ext-help-commands
nextcord-ext-help-commandsA Nextcord extension for pre-built custom help commands for prefix commands and slash commands.InstallingRequirementsPython 3.8 or higher is requiredIt is necessary to first installNextcordThen install the extension by running one of the following commands:# Linux/macOSpython3-mpipinstall-Unextcord-ext-help-commands# Windowspy-3-mpipinstall-Unextcord-ext-help-commandsTo make use of pagination help commands, you must also installnextcord-ext-menus.# Linux/macOSpython3-mpipinstall-U"nextcord-ext-help-commands[menus]"# Windowspy-3-mpipinstall-Unextcord-ext-help-commands[menus]Basic Usagefromnextcord.extimportcommandsfromnextcord.extimporthelp_commandsbot=commands.Bot(command_prefix="$",help_command=help_commands.PaginatedHelpCommand())bot.run("token")LinksDocumentationOfficial Discord serverLicenseCopyright (c) 2022-Present The Nextcord Developers
Package: nextcord-ext-ipc
nextcord-ext-ipcAboutA Nextcord extension for inter-process communication.InstallationPython 3.8 or higher is requiredIt is necessary to first installNextcordThen install the extension by running one of the following commands:# Linux/macOSpython3-mpipinstall-Unextcord-ext-ipc# Windowspy-3-mpipinstall-Unextcord-ext-ipcLinksDocumentationUsage ExamplesSupport Discord ServerLicenseCopyright (c) 2020 Ext-CreatorsCopyright (c) 2021 Nextcord Developers
Package: nextcord-ext-menus
nextcord-ext-menusA Nextcord extension that makes working with reaction menus and button component menus a bit easier.InstallingRequirementsPython 3.8 or higher is requiredIt is necessary to first installNextcordThen install the extension by running one of the following commands:# Linux/macOSpython3-mpipinstall-Unextcord-ext-menus# Windowspy-3-mpipinstall-Unextcord-ext-menusLinksDocumentationUsage ExamplesOfficial Discord serverLicenseCopyright (c) 2021 The Nextcord DevelopersCopyright (c) 2020-2021 Danny Y. (Rapptz)
Package: nextcord-ext-pomice
PomiceThe modernLavalinkwrapper designed fornextcordThis library is heavily based off of/uses code from the following libraries:WavelinkSlateGranitepyInstallTo install the library, you need the lastest version of pip and minimum Python 3.8Stable versionpip install nextcord-ext-pomiceUnstable version (this one gets more frequent changes)pip install git+https://github.com/techpluscraft/nextcord-ext-pomiceSupportThe official documentation ishereExamplesIn-depth examples are located in the examples folderHere's a quick example:fromnextcord.extimportpomiceimportnextcordimportrefromnextcord.extimportcommandsURL_REG=re.compile(r'https?://(?:www\.)?.+')classMyBot(commands.Bot):def__init__(self)->None:super().__init__(command_prefix='!',activity=nextcord.Activity(type=nextcord.ActivityType.listening,name='to music!'))self.add_cog(Music(self))asyncdefon_ready(self)->None:print("I'm online!")awaitself.cogs["Music"].start_nodes()classMusic(commands.Cog):def__init__(self,bot)->None:self.bot=botself.pomice=pomice.NodePool()asyncdefstart_nodes(self):awaitself.pomice.create_node(bot=self.bot,host='127.0.0.1',port='3030',password='youshallnotpass',identifier='MAIN')print(f"Node is ready!")@commands.command(name='join',aliases=['connect'])asyncdefjoin(self,ctx:commands.Context,*,channel:nextcord.TextChannel=None)->None:ifnotchannel:channel=getattr(ctx.author.voice,'channel',None)ifnotchannel:raisecommands.CheckFailure('You must be in a voice channel to use this command''without specifying the channel argument.')awaitctx.author.voice.channel.connect(cls=pomice.Player)awaitctx.send(f'Joined the voice channel `{channel}`')@commands.command(name='play')asyncdefplay(self,ctx,*,search:str)->None:ifnotctx.voice_client:awaitctx.invoke(self.join)player=ctx.voice_clientresults=awaitplayer.get_tracks(query=f'{search}')ifnotresults:raisecommands.CommandError('No results were found for that search term.')ifisinstance(results,pomice.Playlist):awaitplayer.play(track=results.tracks[0])else:awaitplayer.play(track=results[0])bot=MyBot()bot.run("token here")FAQWhy is it saying "Cannot connect to host"?You need to have a Lavalink node setup before you can use this library. Download ithereWhat experience do I need?This library requires that you have some experience with Python, asynchronous programming and the nextcord library.Why is it saying "No module named pomice found"?You need toinstallthe package before you can use itContributorsThanks tovveepsfor implementing some features I wasn't able to do myself
Package: nextcord-ext-space
spaceAn event logger fornextcord.Install$python3.8-mpipinstall-Unextcord-ext-spaceExtrasdatabasespackageYou may want to manually installdatabaseswith the correct drivers installed.Examplesimportloggingfromnextcord.ext.spaceimportAstronaut,EventFlags,Configurationfromnextcord.ext.space.recorders.databasesimportDatabaseRecorderlogging.basicConfig(filename='myBotLog.log',filemode='w',level=logging.DEBUG)config=Configuration(events=EventFlags.guilds()recorder=DatabaseRecorder('url/to/my/database'))client=Astronaut(config=config)client.run('TOKEN')
Package: nextcordhealthcheck
Nextcord Health CheckA small Python 3 library and command line app to automate Docker health checks fornextcordbots.Installationpip install nextcordhealthcheckThis will install both the Python library and the command line app, the python library is importable usingimport nextcordhealthcheckand the CLI app by using the commandnextcordhealthcheck.How It Works & Usage ExamplesPython Library (Server)The library has 1 function,start.starttakes anextcord.Clientobject as well as optional parameters, and returns an awaitable that produces aasyncio.base_events.Server:defstart(client:nextcord.client,port:int=40404,bot_max_latency:float=0.5)->Awaitable[asyncio.base_events.Server]startcallsasyncio.start_server, creating an asyncio TCP socket server which listens for connections. Once a client connects, it tests the nextcord client for various things that indicate its health (latency, login status, etc.), and the result of this health check is then sent to the healthcheck client.The returnedServerobject can be used to stop the server (e.g.healthcheck_server.close())The default port for the socket server is40404, if you change it you will need to use the--portflag on the client as well.importnextcordimportnextcordhealthcheckclassCustomClient(nextcord.Client):def__init__(self,*args,**kwargs):super().__init__(*args,**kwargs)self.healthcheck_server=Noneasyncdefon_ready(self):ifself.healthcheck_serverisNone:self.healthcheck_server=awaitnextcordhealthcheck.start(self)# Later you can close or check on self.healthcheck_serverCLI App (Client)The CLI app is a simple client that connects to the server and determines its exit code from what the server sends;0for healthy,1for unhealthy.Here's an example of using in a Dockerfile:FROMpython:3.11-slim-buster# Copy files, install requirements, setup bot, etc.RUNpipinstallnextcordhealthcheck# The `|| exit 1` isn't required but it's good practice anyway.HEALTHCHECKCMDnextcordhealthcheck||exit1CMD["python","/path/to/bot.py"]
Package: nextcord-logging
Nextcord LoggingNotices:This module was based off ofdiscord-loggingbygrarich.Installation:Install with pip:pip install nextcord-loggingUsageimportloggingfromnextcord.extimportcommandsfromnextcord_loggingimportDiscord_Handlerlogger=logging.getLogger()WEBHOOK_URL="Your webhook url"handler=Discord_Handler(WEBHOOK_URL)logger.addHandler(handler)bot=commands.Bot(command_prefix="!")bot.run("token")Update with pip:pip install nextcord-logging --upgradeInstall from source:python setup.py installLinks:GitHub repoPyPi project page
Package: nextcord-ormar
Nextcord-OrmarFormerly Nextcord-TortoiseNextcord-Ormar is a library to help integrate the async Django-inspired ORMOrmarwith aNextcordbot. It's
designed to compliment the modular cog system of Nextcord. It also comes with NXAlembic, a preconfigured version ofAlembicto help with creating and applying database migrations.Nextcord-Ormar is still in active development, there may be breaking changes as the library is polished up. If you have
any feedback, feel free to open an issue!QuickstartInstall Nextcord-Ormar and Ormar with the correctdatabase backend.pipinstallnextcord-ormarormar[sqlite]Import Nextcord-Ormar's bot class and pass it yourdatabase URL.fromnextcord_ormarimportBotbot=Bot(command_prefix="$",database_url="sqlite:///db.sqlite")In your cog file, import OrmarApp to create an app, then use AppModel to create a database model. Define your model
like anormal Ormar model.If you prefer, you can also define your models elsewhere and import them into your cog.importormarfromnextcord_ormarimportOrmarApp,AppModelModelMeta=OrmarApp.create_app("example")classExampleTable(AppModel):classMeta(ModelMeta):passid=ormar.Integer(primary_key=True)discord_id=ormar.BigInteger()message=ormar.Text()You can then use this model in your cog.fromnextcord.extimportcommandsclassExample(commands.Cog):def__init__(self,nextcord):self.nextcord=nextcord@commands.command("example")asyncdefexample(self,ctx:commands.Context,*args):new_example=awaitExampleTable.objects.create(discord_id=ctx.author.id,message=args[0])awaitctx.send("Hello!")Before you can start the bot though, you'll need to set up migrations and the database. Create a file callednxalembic.iniin your project root folder and tell it how to import your bot.[nxalembic]module=example.demobot=botYou can think of this asfrom module import bot, or in this instance,from example.demo import bot. NXAlembic will
use it to import your bot along with your definitions for each model.In the same folder, you can now use thenxalembictool. Create migrations withnxalembicmigrateUpgrade the databasenxalembicupdateYour bot is now ready to start!RoadmapOther than bug fixes as they arise, the current plan is to just add the rest of the Alembic commands to NXAlembic.
If there is a specific feature you want that is missing from either the bot integration or NXAlembic, feel free to
open an issue.Thanks toMiguel Grinberg forFlask-Migrationswhich was a useful example.Mike BayerforSQLAlchemyandAlembic
Package: nextcord-pretty-help
nextcord-pretty-helpA Nextcord compatible form ofstroupbslayen's discord-pretty-help project, which is an embed-based version of the built inhelpcommand for projects using discord.py.The output is inspired by theDefaultHelpCommandthat discord.py uses, but is revised to use Discord embeds instead of plain text, and additional sorting on paginated sections that can be "scrolled" through using reactions.Installationpip install nextcord-pretty-helpUsageExample of how to use it:fromnextcord.extimportcommandsfrompretty_helpimportPrettyHelpclient=commands.Bot(command_prefix="!",help_command=PrettyHelp())Added Optional Argscolor- Set the default embed colorending_note- Set the footer of the embed. Ending notes are fed acommands.Context(ctx) and aPrettyHelp(help) instance for more advanced customization.index_title- Set the index page name default is"Categories"menu- set a custom menu for navigating pages. Uses apretty_help.PrettyMenu()instance. Default ispretty_help.DefaultMenu()no_category- Set the name of the page with commands not part of a category. Default is "No Category"sort_commands- Sort commands and categories alphabeticallyshow_index- Show the index page or notpretty_help.DefaultHelp argsactive_time- Set the time (in seconds) that the message will be active. Default is 30sdelete_after_timeout- Delete the message afteractive_timeinstead of removing reactions. DefaultFalsepage_left- The emoji to use to page leftpage_right- The emoji to use to page rightremove- The emoji to use to remove the help messageBy default, the help will just pick a random color on every invoke. You can change this using thecolorargument:fromnextcord.extimportcommandsfrompretty_helpimportDefaultMenu,PrettyHelp# ":discord:743511195197374563" is a custom discord emoji format. Adjust to match your own custom emoji.menu=DefaultMenu(page_left="\U0001F44D",page_right="👎",remove=":discord:743511195197374563",active_time=5)# Custom ending noteending_note="The ending note from{ctx.bot.user.name}\nFor command{ctx.clean_prefix}{ctx.invoked_with}"bot=commands.Bot(command_prefix="!")bot.help_command=PrettyHelp(menu=menu,ending_note=ending_note)The basichelpcommand will break commands up by cogs. Each cog will be a different page. Those pages can be navigated with
the arrow embeds. The message is unresponsive after 30s of no activity, it'll remove the reactions to let you know.Changelog[1.3.3]Addeddelete_after_timeoutkwarg so messages are deleted after the time limit instead of just removing emojisAdded command cooldown information to pagesNotes:Nextcord must already be installed to use thismanage-messagespermission is recommended so reactions can be removed automatically
Package: nextcord-unaliased
NextcordA modern, easy-to-use, feature-rich, and async-ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawaitProper rate limit handlingOptimised in both speed and memoryInstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Unextcord# Windowspy-3-mpipinstall-UnextcordOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"nextcord[voice]"# Windowspy-3-mpipinstall-Unextcord[voice]To install additional packages for speedup, run the following command:# Linux/macOSpython3-mpipinstall-U"nextcord[speed]"# Windowspy-3-mpipinstall-Unextcord[speed]To install the development version, do the following:$gitclonehttps://github.com/nextcord/nextcord/$cdnextcord$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)aiodns,Brotli,cchardet(for aiohttp speedup)orjson(for json speedup)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.8-devfor Python 3.8)Quick Exampleimportnextcordfromnextcord.extimportcommandsbot=commands.Bot()@bot.slash_command(description="Replies with pong!")asyncdefping(interaction:nextcord.Interaction):awaitinteraction.send("Pong!",ephemeral=True)bot.run("token")You can find more examples in theexamples directory.NOTE:It is not advised to leave your token directly in your code, as it allows anyone with it to access your bot. If you intend to make your code public you shouldstore it securely.LinksDocumentationOfficial Discord ServerDiscord API
Package: nextcordunaliased.py
NextcordA modern, easy-to-use, feature-rich, and async-ready API wrapper for Discord written in Python.Fork noticeThis is a fork of discord.py, which unfortunately has beenofficially discontinuedon 28th August 2021.
Nextcord will try to replace discord.py, withcontinued support and features, to still offer former discord.py users a stable API wrapper for their bots.Key FeaturesModern Pythonic API usingasyncandawaitProper rate limit handlingOptimised in both speed and memoryInstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Unextcord# Windowspy-3-mpipinstall-UnextcordOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"nextcord[voice]"# Windowspy-3-mpipinstall-Unextcord[voice]To install additional packages for speedup, run the following command:# Linux/macOSpython3-mpipinstall-U"nextcord[speed]"# Windowspy-3-mpipinstall-Unextcord[speed]To install the development version, do the following:$gitclonehttps://github.com/nextcord/nextcord/$cdnextcord$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)aiodns,Brotli,cchardet(for aiohttp speedup)orjson(for json speedup)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick Examplefromnextcord.extimportcommandsbot=commands.Bot(command_prefix='$')@bot.command()asyncdefping(ctx):awaitctx.reply('Pong!')bot.run('token')You can find more examples in the examples directory.NOTE:It is not advised to leave your token directly in your code, as it allows anyone with it to access your bot. If you intend to make your code public you shouldstore it securely.LinksDocumentationOfficial Discord ServerDiscord API
Package: nextcore
NextcoreA low level Discord API wrapper.✨ FeaturesSpeedWe try to make the library as fast as possible, without compromising on readability of the code or features.ModularityAll the components can easily be swapped out with your own.ControlNextcore offers fine-grained control over things most libraries don't support.This currently includes:Setting priority for individual requestsSwapping out componentsExamples🏓 Ping pongA simple "ping pong" example in nextcore.
This will respond with "pong" each time someone sends "ping" in the chat.importasynciofromosimportenvironfromtypingimportcastfromdiscord_typingsimportMessageDatafromnextcore.gatewayimportShardManagerfromnextcore.httpimportBotAuthentication,HTTPClient,Route# ConstantsAUTHENTICATION=BotAuthentication(environ["TOKEN"])# Intents are a way to select what intents Discord should send to you.# For a list of intents see https://discord.dev/topics/gateway#gateway-intentsGUILD_MESSAGES_INTENT=1<<9MESSAGE_CONTENT_INTENT=1<<15INTENTS=GUILD_MESSAGES_INTENT|MESSAGE_CONTENT_INTENT# Guild messages and message content intents.# Create a HTTPClient and a ShardManager.# A ShardManager is just a neat wrapper around Shard objects.http_client=HTTPClient()shard_manager=ShardManager(AUTHENTICATION,INTENTS,http_client)@shard_manager.event_dispatcher.listen("MESSAGE_CREATE")asyncdefon_message(message:MessageData):# This function will be called every time a message is sent.ifmessage["content"]=="ping":# Send a pong message to respond.route=Route("POST","/channels/{channel_id}/messages",channel_id=message["channel_id"])awaithttp_client.request(route,rate_limit_key=AUTHENTICATION.rate_limit_key,json={"content":"pong"},headers=AUTHENTICATION.headers,)asyncdefmain():awaithttp_client.setup()# This should return once all shards have started to connect.# This does not mean they are connected.awaitshard_manager.connect()# Raise a error and exit whenever a critical error occurs(error,)=awaitshard_manager.dispatcher.wait_for(lambda:True,"critical")raisecast(Exception,error)asyncio.run(main())More examples can be seen in theexamplesdirectory.ContributingWant to help us out? Please read ourcontributingdocs.
Package: nextdataAI
aifGenerate some MazesImplement course solutionsBFSDFSGreedyA*Manhattan HeuristicEuclidean HeuristicOverkill Heuristic that destroys both Manhattan and EuclideanDijkstraGenetic AlgorithmDL/RL approachesQ-LearningQ-Learning with NN and Experience ReplayQ-Learning with LSTM and Experience ReplayA* with NN heuristicA* with LSTM heuristicA* with CNN heuristicEvaluation MetricsTimeNumber of Nodes ExpandedNumber of Nodes in the PathNumber of Nodes in the SolutionNumber of Nodes in the MazeHeuristicsManhattanEuclideanNNHeuristicImplemented:white_check_mark::white_check_mark::white_check_mark:
Package: nextdns
nextdnsPython wrapper forNextDNSAPI.How to use package"""Example of usage."""importasyncioimportloggingfromaiohttpimportClientSessionfromnextdnsimportApiError,InvalidApiKeyError,NextDnsAPI_KEY="xxx"logging.basicConfig(level=logging.DEBUG)asyncdefmain():"""Main function."""asyncwithClientSession()aswebsession:try:nextdns=awaitNextDns.create(websession,API_KEY)profile_id,profile_name=nextdns.profiles[2]profile=awaitnextdns.get_profile(profile_id)status=awaitnextdns.get_analytics_status(profile_id)dnssec=awaitnextdns.get_analytics_dnssec(profile_id)encryption=awaitnextdns.get_analytics_encryption(profile_id)ip_versions=awaitnextdns.get_analytics_ip_versions(profile_id)protocols=awaitnextdns.get_analytics_protocols(profile_id)exceptInvalidApiKeyError:print("Invalid API Key")exceptApiErroraserror:print(f"API Error:{error.status}")else:print(f"Profile:{profile_name}({profile_id})")print(profile)print(status)print(dnssec)print(encryption)print(ip_versions)print(protocols)loop=asyncio.new_event_loop()loop.run_until_complete(main())loop.close()