Saravanan666/pypi-org huggingface dataset:
Package: hikari-kasai
KasaiKasai serves as a bridge between Discord and Twitch, allowing a single bot to interact with both platforms.This serves to extendHikari, and cannot be used without it.InstallationTo install the latest released version of Kasai, use the following command:pipinstallhikari-kasaiYou can also install the latest development version using the following command:pipinstallgit+https://github.com/parafoxia/hikari-kasaiYou may need to prefix these commands with a call to the Python interpreter depending on your OS and Python configuration.Creating your botKasai provides a subclass forhikari.GatewayBotthat contains methods and attributes for Twitch chat interfacing.importkasaibot=kasai.GatewayBot(...)To use Kasai with command handlers, you will need to create a custom subclass that inherits from bothkasai.GatewayBotand your command handler's bot class.
For example, if you want to useLightbulb:importkasaiimportlightbulbclassBot(kasai.GatewayBot,lightbulb.BotApp):...bot=Bot(...)UsageA working implementation could look something like this:importosimportdotenvimporthikariimportkasai# You will need a .env file for this.dotenv.load_dotenv()# Create the bot.bot=kasai.GatewayBot(os.environ["TOKEN"],os.environ["IRC_TOKEN"],os.environ["TWITCH_CLIENT_ID"],os.environ["TWITCH_CLIENT_SECRET"],)@bot.listen(hikari.StartedEvent)asyncdefon_started(event:hikari.StartedEvent):# Connect to your Twitch chat.awaitbot.twitch.join("twitchdev")@bot.listen(hikari.GuildMessageCreateEvent)asyncdefon_message(event:hikari.GuildMessageCreateEvent):# Send a message from Discord to Twitch chat.ifevent.content.startswith("!send"):awaitbot.twitch.create_message("twitchdev",event.content[6:])@bot.listen(kasai.MessageCreateEvent)asyncdefon_twitch_message(event:kasai.MessageCreateEvent):# Basic Twitch command implementation.ifevent.content.startswith("!ping"):awaitevent.message.respond("Pong!",reply=True)# Run the bot.bot.run()There aremore examplesshould you wish to see them.
It may also be worth looking into how tospeed Hikari upto get the best performance out of Kasai.ContributingContributions are very much welcome! To get started:Familiarise yourself with thecode of conductHave a look at thecontributing guideLicenseThehikari-kasaimodule for Python is licensed under theBSD 3-Clause License.
Package: hikari-lightbulb
LightbulbLightbulb is designed to be an easy to use command handler library that integrates with the
Discord API wrapper library for Python, Hikari.This library aims to make it simple for you to make your own Discord bots and provide
all the utilities and functions you need to help make this job easier.InstallationUse the package managerpipto install Lightbulb.pipinstallhikari-lightbulbUsage# Import the command handlerimportlightbulb# Instantiate a Bot instancebot=lightbulb.BotApp(token="your_token_here",prefix="your_prefix_here")# Register the command to the bot@bot.command# Use the command decorator to convert the function into a command@lightbulb.command("ping","checks the bot is alive")# Define the command type(s) that this command implements@lightbulb.implements(lightbulb.PrefixCommand)# Define the command's callback. The callback should take a single argument which will be# an instance of a subclass of lightbulb.context.Context when passed inasyncdefping(ctx:lightbulb.Context)->None:# Send a message to the channel the command was used inawaitctx.respond("Pong!")# Run the bot# Note that this is blocking meaning no code after this line will run# until the bot is shut offbot.run()IssuesIf you find any bugs, issues, or unexpected behaviour while using the library,
you should open an issue with details of the problem and how to reproduce if possible.
Please also open an issue for any new features you would like to see added.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please try to update tests as appropriate and ensure that documentation is updated if
you add any features accessible through the public API.If you use this library and like it, feel free to sign up to GitHub and star the project,
it is greatly appreciated and lets me know that I'm going in the right direction!LinksLicense:LGPLv3Repository:GitHubDocumentation:ReadTheDocs
Package: hikari-miru
hikari-miruA component handler forhikari, aimed at making the creation & management of Discord UI components easy.[!TIP]
Like what you see? Check outarc, a command handler with a focus on type-safety and correctness.InstallationTo install miru, run the following command:pipinstall-Uhikari-miruTo check if miru has successfully installed or not, run the following:python3-mmiru# On Windows you may need to run:py-mmiruUsageimporthikariimportmiru# REST bots are also supportedbot=hikari.GatewayBot(token="...")# Wrap the bot in a miru clientclient=miru.Client(bot)classMyView(miru.View):@miru.button(label="Rock",emoji="\N{ROCK}",style=hikari.ButtonStyle.PRIMARY)asyncdefrock_button(self,ctx:miru.ViewContext,button:miru.Button)->None:awaitctx.respond("Paper!")@miru.button(label="Paper",emoji="\N{SCROLL}",style=hikari.ButtonStyle.PRIMARY)asyncdefpaper_button(self,ctx:miru.ViewContext,button:miru.Button)->None:awaitctx.respond("Scissors!")@miru.button(label="Scissors",emoji="\N{BLACK SCISSORS}",style=hikari.ButtonStyle.PRIMARY)asyncdefscissors_button(self,ctx:miru.ViewContext,button:miru.Button)->None:awaitctx.respond("Rock!")@miru.button(emoji="\N{BLACK SQUARE FOR STOP}",style=hikari.ButtonStyle.DANGER,row=1)asyncdefstop_button(self,ctx:miru.ViewContext,button:miru.Button)->None:self.stop()# Stop listening for interactions@bot.listen()asyncdefbuttons(event:hikari.GuildMessageCreateEvent)->None:# Ignore bots or webhooks pinging usifnotevent.is_human:returnme=bot.get_me()# If the bot is mentionedifme.idinevent.message.user_mentions_ids:view=MyView()# Create a new view# Send the view as message componentsawaitevent.message.respond("Rock Paper Scissors!",components=view)client.start_view(view)# Attach to the client & start itbot.run()To get started withmiru, see thedocumentation, or theexamples.Extensionsmiru has two extensions built-in:ext.nav- To make it easier to build navigators (sometimes called paginators).ext.menu- To make it easier to create nested menus.Check the corresponding documentation and theexampleson how to use them.Issues and supportFor general usage help or questions, see the#miruchannel in thehikari discord, if you have found a bug or have a feature request, feel free toopen an issue!ContributingSeeContributingLinksDocumentationExamplesLicense
Package: hikari-ongaku
OngakuA voice library for Hikari.This is a library, written in asynchronous python, that is designed to take a lavalink server connection, and allow for users, to be able to play music usinghikari.More InformationPlease check out thedocs, and also checkout theexamplesto get started.FeaturesPlayer controlVolumePlaylistsQueuingDeleting (via position, and Track)ClearingAddingSkippingSeeking/ReversingFiltersMutingRequestors (users who requested the song.)EventsReadyStatisticsTrack StartTrack EndTrack ExceptionTrack StuckEmpty QueueNext QueueSessionsAutomatic sessionsManual sessionsOthersTraces (for debugging code.)
Package: hikari-sake
SakeA distributed asynchronous cache interface (plus several implementations) designed for use with Hikari.InstallationYou can install Sake from PyPI using the following command.python -m pip install hikari-sake -UThehikari-sake[tanjun]feature flag can be used to ensure that the installed Tanjun version
is compatible with Sake's Tanjun adapters. You should still have a Tanjun version pinned in
your own requirements as this just provides an acceptable range for the requirement.SupportHikari's support guildprovides for support for Sake.Quick Usage.For usage see the thedocumentationandexamples.
Package: hikari_shim
Usage:importdiscordimporthikariimporthikari_shimdpy_bot=discord.Client(intents=discord.Intents.all(),enable_debug_events=True)hikari_bot=hikari.GatewayBot("TOKEN")@dpy_bot.eventasyncdefon_message(message):ifmessage.content=="discord.py is cool":awaitmessage.channel.send("yes it is!")@hikari_bot.listen(hikari.MessageCreateEvent)asyncdefhikari_on_message(evt):ifevt.content=="hikari is cool":awaitevt.message.respond("yes it is!")hikari_shim.partial_load(dpy_bot,hikari_bot)dpy_bot.run("TOKEN")There's also a full (?) shim, but it runs into loop issues and whatnot. It
requires you to use a Hikari client with no intents and start both clients.caveat emptorThis does not work withdiscord.AutoShardedClient.This has a peer dependency on discord.py, make sure to install that!There are some operations that are not shimmed (voice and chunking guild
members, to be specific, because I do not know how to do them in dpy).Ratelimiting is not shared.You will have double the CPU usage and double the memory usage. (or
something in that range).Some components may not have been started yet. (if you're using a non-
standard client).You will get all the incompatibilities Discord.py gives. This means, for
example, you cannot get thread events on dpy 1.7 even if Hikari has those.More, probably.why though?Incrementally rewrite your bot in a whole library. This means that you can
have a total rewrite without people ever noticing (though they will,
probably). Also, this lets you stick with discord.py while the Hikari
community matures for some parts (though caveats still apply, so you'll want
to have the entire bot in Hikari eventually).contact meYou can find me in theHikari Discord server.Download from PyPI!pip install hikari_shim
Package: hikari-tanchi
tanchiA signature parser forhikari's command handlertanjun.Finally be able to define your commands without those bloody decorator chains!Example@component.with_slash_command@tanchi.as_slash_command(default_to_ephemeral=True)asyncdefcommand(ctx:tanjun.abc.SlashContext,integer:int=0,flag:bool=False,channel:typing.Optional[hikari.GuildTextChannel]=None,):"""Small tanchi commandParameters----------integer : intAny integer value.flag : boolWhether this flag should be enabled.channel : hikari.GuildTextChannelThe channel to target."""Documentation?Ordinary TypesAll builtin types supported in slash commands (str,int,float,bool) do not need any special care.option:strChoicesChoices can either be made withtyping.Literalorenum.Enumoption:typing.Literal["Foo","Bar","Baz"]classMyEnum(enum.IntEnum):foo=1bar=2baz=3option:MyEnumRangesInteger and float options support min and max boundaries. These can be set withtanchi.Range.
The type of the option is discerned from the boundaries.int_option:tanchi.Range[1,10]float_option:tanchi.Range[0.0,1.0]ChannelsChannels types may be enforced with the help oftyping.Union. If you want all channel types usehikari.GuildChanneloption:typing.Union[hikari.GuildTextChannel,hikari.GuildNewsChannel]ConvertersTypes are implicitly converted if a builtin tanjun converter is available.option:hikari.EmojiTo provide your own converter you can usetanchi.Converted.option:tanchi.Converted[int,round]AutocompleteInstead of using a decorator, autocompleters can be provided directly in the annotation withtanchi.Autocompleted.option:tanchi.Autocompleted[autocomplete_callback]Since converters and autocompletion are often used together you can provide a converter directly.option:tanchi.Autocompleted[autocomplete_callback,converter_callback]MyPy compatibilityBecause mypy does not respect__class_getitem__you'll most likely have to usetyping.Annotatedfor some cases.option:typing.Annotated[int,tanchi.Range(1,10)]option:typing.Annotated[int,tanchi.Converted(range)]option:typing.Annotated[str,tanchi.Autocompleted(autocomplete_callback)]DocstringsTanchi parses descriptions from docstrings.Examples of all supported formats:ReST"""Command description on a single lineParameters----------foo : OptionTypeDescription for the option named "foo"bar:Description for the option named "bar""""Google"""Command description on a single lineArgs:foo (OptionType): Description for the option named "foo"bar: Description for the option named "bar""""Autocompletion ExamplesInstead of usingcontext.set_choicesyou can choose to return options as either a sequence or a mapping.@tanchi.as_slash_command()asyncdefcommand(context:tanjun.abc.SlashContext,option:str)->None:...@tanchi.with_autocomplete(command,"option")defautocomplete_names(context:tanjun.abc.AutocompleteContext,option:str):return[wordforwordinWORDSifoption.lower()inword.lower()]Returning the options is also supported insideAutocompleted
Package: hikari-tanjun
TanjunA flexible command framework designed to extend Hikari.InstallationYou can install Tanjun from PyPI using the following command in any Python 3.9 or above environment.python -m pip install -U hikari-tanjunQuick UsageFor usage see thedocumentation,usage guide, andtutorials and articles.Community ResourcesTan-chanis a general utility library for
Tanjun. It includes a command annotation parsing extension which parses docstrings to
get the descriptions of slash commands and their options.Redis based implementations of the async cache dependency can be found inhikari-sake>=v1.0.1a1 (exposed by
[sake.redis.ResourceClient.add_to_tanjun][]).SupportHikari's support guildprovides for support for Tanjun.ContributingBefore contributing you should read through thecontributing guidelinesand
thecode of conduct.
Package: hikari-toolkit
hikarihikari is a simple Python3.6+ package intended for manipulating and running
scripts on basic crystallographic files:
.hkl, .fcf, .cif, and to some extent .res and .lst.The following section contains a brief explanation of how to install
and use hikari. For a full description please seethe documentation.Getting startedHikari is registered in PyPI under the namehikari-toolkit.
In order to start working with the package, install it using:$ pip install hikari-toolkitSince it runs on Python 3.6+ and requires specific versions of some popular
packages such asnumpy, you might be interested in using hikari
in a virtual environment. On Linux, it can be created usingvirtualenvwrapper:$ mkvirtualenv -p /usr/bin/python3.6 hikari-venvAfter running python from this virtual environment,
the package should be available in the namespace viaimport hikari.UsageFor the sake of usage, hikari is essentially divided into a few sub-modules,
including dataframes, symmetry, utility, and scripts.
Dataframes contain objects responsible for basic manipulation of files,
for example, thehikari.dataframes.CifFrameis responsible for
reading, modifying and writing the Crystal Information Files.
Scripts, on the other hand, contain ready to use sets of dataframe
instructions and aim to solve certain problems, like reformatting the file
or evaluating data completeness in an experiment. In the majority of cases,
you will be most likely more interested in the latter.AuthorThis software is made byDaniel Tchoń,
and distributed under an MIT license. It is in constant development and all
tips, suggestions, or contributions are welcome and can be senthere.
If you have utilisedhikariin academic work, please consider citingthis article.Dr hab. Anna Makal and prof. dr hab. Krzysztof Woźniak are
acknowledged for helpful discussions about crystallography behind the subject.
Dr Jarosław Kalinowski and mgr inż. Damian Tchoń are acknowledged
for insightful tips on project structure and code optimisation.
Package: hikari-utils
hikari-utilsA python package with utils for hikariTHIS PROJECT IS STILL IN EARLY STAGES!This project is still in early development and we will keep adding featuresSamplesLightbulb Botimporthutilsimporthikaribot=hutils.lightbulbbot(token="Discord Bot Token",prefix="Discord Bot Prefix",intents=hikari.Intents.ALL,insensitive=True)bot.run()Tanjun Botimporthutilsimporthikaribot=hutils.tanjunbot(token="Discord Bot Token",guild_id=DiscordBotGuildID,module_path="./modules")bot.run()Note:When you invite your bot to your server, please add theapplications.commandswhen generating the invite link, otherwise your bot won't work.
Package: hikari-yuyo
YuyoA collection of utility classes and functions designed to expand Hikari.InstillationYou can install yuyo from PyPI using the following command.python -m pip install -U hikari-yuyoThe following feature flags ensure feature-specific optional dependencies are also installed:hikari-yuyo[asgi]ensures the dependencies required to run the Asgi RESTBot adapter.hikari-yuyo[sake]can be used to ensure the installed Sake version is compatible with
Yuyo's functionality which uses Sake. You should still have a Sake version pinned in your
own requirements as this just provides an accepted range for the dependency.hikari-yuyo[tanjun]can be used to ensure the installed Tanjun version is compatible with
Yuyo's Tanjun support (i.e. thefrom_tanjun) class methods.Quick Usage.For usage see the thedocumentationand, more
specifically, theusage guide.SupportHikari's support guildprovides for support for Yuyo.ContributingBefore contributing you should read through thecontributing guidelinesand
thecode of conduct.
Package: hikaru-codegen
Version 1.1.0Try it: see Hikaru convert your K8s YAMLRelease notesFull documentation at Read the DocsHikaru is a collection of tools that allow you to work with Kubernetes resources from within Python in
a variety of ways:Hikaru provides type-annotated classes that model all of the Kubernetes resources in Python
and supports CRUD operations on those classes to manage their lifecycle in your Kubernetes cluster.Hikaru also provides tooling to shift formats for these objects, allowing you to turn K8s YAML
into Python objects, JSON, or Python dicts, and vice-versa. It can also generate Python source code for K8s
objects loaded from non-Python sources.Hikaru also supports a number of features that aid in the management of
your objects such as searching for specific fields or diffing two instances of a K8s resource.Hikaru includes support for creating ‘watches’ on your objects, providing a means to monitor events
on your provisioned K8s resources.Hikaru provides support for creation of CRDs which support all the above features such as CRUD operations
and watches.Finally, Hikaru includes a facility to specify a collection of
resources as an ‘application’, similar in spirit to a Helm chart, and provides the same CRUD,
watch, and management capabilities on the entire application as it does on single resource objects
(full format shifting support to come).This package supports resources from the Kubernetes Python client version 26.x. It depends on thehikaru-corepackage which will be installed automatically when this packages is installed. This package
will work with any version of the Kubernetes Python client >= 26.x; if you need to constrain which release
is installed then you should establish your own requirement limts on the Kubernetes Python client package.See README-core.rst for the main README and links to overall documentation.AboutHikaru is Mr. Sulu’s first name, a famed fictional helmsman.
Package: hikaru-model-23
Version 1.1.1Try it: see Hikaru convert your K8s YAMLRelease notesFull documentation at Read the DocsHikaru is a collection of tools that allow you to work with Kubernetes resources from within Python in
a variety of ways:Hikaru provides type-annotated classes that model all of the Kubernetes resources in Python
and supports CRUD operations on those classes to manage their lifecycle in your Kubernetes cluster.Hikaru also provides tooling to shift formats for these objects, allowing you to turn K8s YAML
into Python objects, JSON, or Python dicts, and vice-versa. It can also generate Python source code for K8s
objects loaded from non-Python sources.Hikaru also supports a number of features that aid in the management of
your objects such as searching for specific fields or diffing two instances of a K8s resource.Hikaru includes support for creating ‘watches’ on your objects, providing a means to monitor events
on your provisioned K8s resources.Hikaru provides support for creation of CRDs which support all the above features such as CRUD operations
and watches.Finally, Hikaru includes a facility to specify a collection of
resources as an ‘application’, similar in spirit to a Helm chart, and provides the same CRUD,
watch, and management capabilities on the entire application as it does on single resource objects
(full format shifting support to come).This package provides model classes to create resources through the Kubernetes Python client version 23.x.
It depends on thehikaru-corepackage which will be installed automatically when this packages is installed. This package
will work with any version of the Kubernetes Python client >= 23.x; if you need to constrain which release
is installed then you should establish your own requirement limits on the Kubernetes Python client package.See README-core.rst for the main README and links to overall documentation.AboutHikaru is Mr. Sulu’s first name, a famed fictional helmsman.
Package: hikaru-model-24
Version 1.1.1Try it: see Hikaru convert your K8s YAMLRelease notesFull documentation at Read the DocsHikaru is a collection of tools that allow you to work with Kubernetes resources from within Python in
a variety of ways:Hikaru provides type-annotated classes that model all of the Kubernetes resources in Python
and supports CRUD operations on those classes to manage their lifecycle in your Kubernetes cluster.Hikaru also provides tooling to shift formats for these objects, allowing you to turn K8s YAML
into Python objects, JSON, or Python dicts, and vice-versa. It can also generate Python source code for K8s
objects loaded from non-Python sources.Hikaru also supports a number of features that aid in the management of
your objects such as searching for specific fields or diffing two instances of a K8s resource.Hikaru includes support for creating ‘watches’ on your objects, providing a means to monitor events
on your provisioned K8s resources.Hikaru provides support for creation of CRDs which support all the above features such as CRUD operations
and watches.Finally, Hikaru includes a facility to specify a collection of
resources as an ‘application’, similar in spirit to a Helm chart, and provides the same CRUD,
watch, and management capabilities on the entire application as it does on single resource objects
(full format shifting support to come).This package provides model classes to create resources through the Kubernetes Python client version 24.x.
It depends on thehikaru-corepackage which will be installed automatically when this packages is installed. This package
will work with any version of the Kubernetes Python client >= 24.x; if you need to constrain which release
is installed then you should establish your own requirement limts on the Kubernetes Python client package.See README-core.rst for the main README and links to overall documentation.AboutHikaru is Mr. Sulu’s first name, a famed fictional helmsman.