Saravanan666/pypi-org huggingface dataset:
Package: textualodon
TextualodonMastodon in your CLI! Created with an excellentTextualframework.WARNINGThis project is in a very early stage of development. It will be heavily refactored in the future.FeaturesLogin using own development tokensShow home, local and global timelineVisual difference between post, boost and repliesFavourite a postBoost a postBookmark a postWrite new postAdd CW to postSet post languageChoose post visibilityAdd poll to postOpen post details to see post comments and ancestorsTo doToo much to write right now. I want to implement as much of the Mastodon API as possible and feasible for a console app.InstallationFrom pypipipinstalltextualodonRun the apptextualodonFrom sourceClone this repogitclonehttps://codeberg.org/djvdq/TextualodonI recommend using a virtual environmentpython-mvenvvenvsourcevenv/bin/activateInstall dependenciespipinstall-rrequirements.txtRun the applicationtextualruntextualodon.pyAPI keys and first setupAt first run, you will need to provide your own development tokens. To do this, follow these steps:Navigate to your Mastodon account and go to "Preferences" → "Development".On that page click "New application" in the upper right corner.In "Application name" you can write whatever you like, this field can't be empty.Scroll the page down and click "Submit". Next, you will use your own tokens to login.Now, go back to your running Textualodon app.Enter your instance url (e.g. mastodon.social)Copy the "Client key" from Mastodon to the "Client ID" field in Textualodon app.Copy the "Client secret" from Mastodon to the "Client secret" field in Textualodon app.Click "Login", a new tab will open in your browser.Copy your authorization token and paste it into the "Grant token" field in Textualodon app.Click "Login" again.Reopen the app to see your home timeline.
Package: textualog
TextualogDisplay, filter and search logging messages in the terminal.This project is powered byrichandtextual.Some of the ideas and code in this project are based on:kaskadetextual example code, e.g. code_viewercutelogInstallationThe easiest way to install the package is by running thepipcommand in the Python virtual environment of your project:$ python -m pip install [--upgrade] textualogUsageThetextualogapp should have been installed in your environment, then run the following command:$ textualog --log <path to the log file>In theexamplesdirectory of this project, you can find an example log file to inspect and play with.The main view is divided in three panels, (1) aRecordspanel that displays all the logging records in a colored view, (2) aRecord Infopanel that displays more details about the selected logging message (a message can be selected by a mouse click), and (3) aLevelspanel that displays the standard logging levels. Logging levels can be switched on or off with a key press, d=debug, i=info, w=warning, e=error, c=critical. When you click inside theRecord Infopanel, the main view will change in aRecord Detailsview that displays all information associated with the selected logging message. This view is mainly used when the logging message has extra multi-line information attached, and depending on the amount of information, this view is scrollable. When the selected logging message contains extra information, theRecord Infopanel will have an asterisk in the title.  Use the Escape key to return to the main view.The app can be terminated with the 'q' key or by pressing CTRL-C. If you need a little help on the keyboard shortcuts, press the '?' key to present theInfo Helppanel on the right side of the terminal. Also here use the Escape key to hide the help panel again.Pressing the 'n' key will slide in aNamespacespanel on the left side of the Terminal.This panel is currently not functional. The idea is to allow the user to filter the logging messages by selecting one or more namespaces.Log file formatsThe current support is for a key-value type of log file. The log line shall have a fixed format, which is what I
currently use in my main other projects. The following key=value pairs shall be there in the given order:level=<logging level>ts=<'%Y-%m-%dT%H:%M:%S,%f'>process=<process name>process_id=<PID>caller=<calling function:lineno>msg=<logging message>In the future other formats can be supported by implementing a plugin class. Planned formats are the JSON format, ...RoadmapDisplay message details including extra lines that contain further information like e.g. traceback info.Implement search functionality to search for strings or regular expressions and position the screen at the first matchStart work on filtering log messages based on their namespace
Package: textual-pandas
textual-pandasA module to display Pandas DataFrames in Textual's DataTable widget.BackgroundPandas is a popular Python library for data analysis. One of the core components of Pandas is the DataFrame object. A DataFrame is a two-dimensional data structure that represents data in rows and columns.Given Pandas DataFrames are tabular in nature, it makes sense to be able to render them in Textual using the DataTable widget. Enter the DataFrameTable widget...InstallationInstalltextual-pandasvia pip:pip install textual-pandasGetting Startedtextual-pandasintroduces a new widget calledDataFrameTable, which uses Textual's DataTable widget as a base.First, you'll need to import theDataFrameTablewidget.fromtextual_pandas.widgetsimportDataFrameTableAfter importing the widget, you'll need to yield theDataFrameTablewidget in your Textual app'scompose()method (like you would with the DataTable widget). Once you're ready to draw the table with your DataFrame data (most likelyon_mount()), you'll simply call theadd_df()method and pass in a Pandas DataFrame.fromtextual.appimportAppfromtextual_pandas.widgetsimportDataFrameTableimportpandasaspd# Pandas DataFramedf=pd.DataFrame()df["Name"]=["Dan","Ben","Don","John","Jim","Harry"]df["Score"]=[77,56,90,99,83,69]df["Grade"]=["C","F","A","A","B","D"]classClassApp(App):defcompose(self):yieldDataFrameTable()defon_mount(self):table=self.query_one(DataFrameTable)table.add_df(df)That's it! Now your DataFrame will display within a DataTable widget!Updating the DataFrameIf you update your DataFrame, and would like to see the updates in your app, then you'll need to use theupdate_df()method and pass in your updated DataFrame object.If you only want to update the rendered DataFrameTable (without the need to change the DataFrame), you may also use theupdate_cell()andupdate_cell_at()methods that are provided by the DataTable widget.df.insert(1,"Teacher",["Mr. Smith","Mr. Smith","Mr. Smith","Mr. Smith","Mr. Smith","Mr. Smith",],)table=self.query_one(DataFrameTable)# Provide new DataFrame to update DataFrameTable widgettable.update_df(df)ContributingI built this module for the sole purpose of displaying a Pandas DataFrame in a DataTable widget. I'm sure there's additional functionality with the Pandas library that others would like to see!If you have any ideas, questions, or issues, please feel free to open an issue or PR!
Package: textual-qrcode
textual-qrcodeIntroductionWhile, I admit, likely of little utility really, this library aims to show
one possible way of writing and "shipping" a custom widget forTextual. Key here is that the library
contains and provides a custom widget which can be imported and used in an
application; but it also provides a simple application that can be run to
see the widget in action.Please note!This library is just a thin wrapper aroundhttps://qrenco.de/. Each time
you create a QR code the content you encode is sent to that website. It also
means, of course, that this is only usable with a working net connection.
Please keep these things in mind if you do decide to actually use this for
something.InstallingThe library itself can be installed withpip:$pipinstalltextual-qrcodeor with your Python environment manager of choice.Running the test applicationThe demo/test application can be run like this:$python-mtextual_qrcodeWhen you've finished testing, pressCtrl+Cto quit.Using the widgetTo make use of theQRCodewidget, import it into your code:fromtextual_qrcodeimportQRCodeThe widget itself takes all of the arguments that a normal TextualWidgettakes, but has the addition of an initial positional argument which is some
text to encode. An example use of it could look like:defcompose(self)->ComposeResult:yieldHeader()yieldQRCode("https://textual.textualize.io/")yieldFooter()The widget also has aencodemethod, that lets you update the QR code to
display something else. For example:self.query_one(QRCode).encode("Now I've changed it to this")The widget will send out one of two messages when an attempt is made to
encode some content. If the content was encoded fine aQRCode.Encodedmessage is sent out, which can be caught like this:defon_qrcode_encoded(self,event:QRCode.Encoded)->None:# Do something now that the QR code was updated fine.If there is an error encoding the contentQRCode.Errorwill be sent out.
this can be used like this:defon_qrcode_error(self,event:QRCode.Error)->None:# Do something about the error.In both cases the event sent out has aqr_codeproperty which is theQRCodewidget involved.
Package: textual-query-sandbox
Textual Query SandboxA quick spur-of-the-moment hack that will likely grow into something a wee
bit more useful. For now though, it's a simple/pragmatic tool for quickly
testingTextual queries.InstallationInstall either withpipor (ideally)pipx:$pipxinstalltextual-query-sandboxThen runtqs. That's it!
Package: textual-select
Textual: SelectIMPORTANT: Since version 0.24.0 Textual implemented a native dropdown. I strongly
recommend to use the native version. This repository will slowly die. More information
at theBlog Post about Select control.A simple select widget (aka dropdown) fortextualwith an optional search field.Usagefromtextual_selectimportSelectdropdown_data=[{"value":0,"text":"Pick-Up"},{"value":1,"text":"SUV"},{"value":2,"text":"Hatchback"},{"value":3,"text":"Crossover"},{"value":4,"text":"Convertible"},{"value":5,"text":"Sedan"},{"value":6,"text":"Sports Car"},{"value":7,"text":"Coupe"},{"value":8,"text":"Minivan"}]Select(placeholder="please select",items=dropdown_data,list_mount="#main_container")Installationpipinstalltextual-selectRequires textual 0.11.0 or later.LimitationsThis textual widget is in early stage and has some limitations:It needs a specific mount point (list_mount) where the dropdown list
shall appear. This is needed because the container widget with the select
itself could be too small. Maybe in future versions this will no longer
needed.It can only open below, not above: Make sure to reserve space below the
dropdown.The dropdown list has a fixed height of 5 entries. This will be configurable
in future versions.Similar WidgetsIf you are looking for an autocomplete, please refer totextual-autocompleteby Darren Burns.
Package: textual-slider
textual-sliderA Textual widget for a simple slider.InstallationInstall textual-slider using pip:pip install textual-sliderUsagetextual-slider provides a simpleSliderwidget for use inTextual, that allows selecting anintegervalue within a given range.The initial value of the slider if not specified is the minimum value.
You can also optionally specify a step size between valid values.yieldSlider(0,10)yieldSlider(min=200,max=500,step=100,value=300)You can find more complete usage examples of theSliderwidget in the/examples/directory of this repo.LimitationsTextual apps run in the terminal, which work in terms of character cells rather
than pixels. This means you obviously can't have the same fine-grained control
for this slider as usual, depending on the size of the slider range and the
styled width.Currently this slider widget only works withintegervalues. Any suggestions
for how to work with floating point values would be welcome!ContributingI created this simple slider widget as a learning exercise to better
understand Textual and it is still a work in progress.I'd really appreciate any feedback or suggestions, but I'm afraid I
probably won't be accepting any PRs at the moment.LicenceLicensed under theGNU General Public License v3.0.
Package: textual-snowfall
textual-snowfallTable of ContentsInstallationLicenseInstallationpip install textual-snowfallLicensetextual-snowfallis distributed under the terms of theMITlicense.UsageTextual-snowfall is aTextualcontainer widget that'll add snow to your app. Use it as you would use a normal container, or use it as a mixin with other container classes.For example:fromtextual.appimportAppfromtextual.containersimportScrollableContainerfromtextual_snowfall.widgetsimportSnowfallclassSnowScroll(ScrollableContainer,Snowfall):passclassMyApp(App):defcompose(self):yieldSnowScroll()
Package: textual-terminal
Textual: TerminalA terminal widget forTextualusingPyteas a linux terminal emulator.Textual application example with two terminal widgets:Usagefromtextual_terminalimportTerminalclassTerminalApp(App):defcompose(self)->ComposeResult:yieldTerminal(command="htop",id="terminal_htop")yieldTerminal(command="bash",id="terminal_bash")defon_ready(self)->None:terminal_htop:Terminal=self.query_one("#terminal_htop")terminal_htop.start()terminal_bash:Terminal=self.query_one("#terminal_bash")terminal_bash.start()Installationpipinstalltextual-terminalFeaturesColored outputAutomatic resize to widget dimensionsSimple key handling (navigation, function keys)Simple mouse tracking (click, scroll)Optionsdefault_colorsBy default, textual-terminal uses the colors defined by the system (not the
Textual colors). To use the Textual background and foreground colors for
"default" ANSI colors, set the optiondefault_colorstotextual:Terminal(command="htop",default_colors="textual")Note: This only applies to ANSI colors without an explicit setting, e.g. if the
background is set to "red" by an application, it will stay red and the option
will not have any effect.ReferencesThis library is based on theTextual pyte examplebyDavid Brochart.
Package: textual-universal-directorytree
Textual Universal Directory TreeATextualplugin to make theDirectoryTreewidget compatible with filesystems other than local.Installationpipinstalltextual-universal-directorytreeExtra DependenciesSome filesystems require additional dependencies to be installed.
Theremoteextra includes all the known optional dependencies. See theFilesystems Supportedsection for more information.pipinstall"textual-universal-directorytree[remote]"UsageThe below example shows how to usetextual-universal-directorytreein a Textual app.
It uses the GitHub filesystem to display the contents of the textual GitHub repository.
It requires therequestslibrary to be installed.fromrich.syntaximportSyntaxfromtextualimportonfromtextual.appimportApp,ComposeResultfromtextual.containersimportHorizontal,VerticalScrollfromtextual.widgetsimportFooter,Header,Staticfromtextual_universal_directorytreeimportUniversalDirectoryTreeclassUniversalDirectoryTreeApp(App):"""The power of upath and fsspec in a Textual app"""BINDINGS=[("q","quit","Quit"),]def__init__(self,*args,path:str,**kwargs):super().__init__(*args,**kwargs)self.universal_path=pathdefcompose(self)->ComposeResult:yieldHeader()self.directory_tree=UniversalDirectoryTree(path=self.universal_path)self.file_content=Static()yieldHorizontal(self.directory_tree,VerticalScroll(self.file_content))yieldFooter()@on(UniversalDirectoryTree.FileSelected)defhandle_file_selected(self,message:UniversalDirectoryTree.FileSelected)->None:"""Do something with the selected file.Objects returned by the FileSelected event are upath.UPath objects andthey are compatible with the familiar pathlib.Path API built into Python."""selected_file_path=message.pathfile_content=selected_file_path.read_text(errors="replace")lexer=Syntax.guess_lexer(path=str(selected_file_path))code=Syntax(code=file_content,lexer=lexer)self.file_content.update(code)Run the above app in your terminal:python-mtextual_universal_directorytreegithub://juftin:textual-universal-directorytree@main/Filesystems Supportedtextual-universal-directorytreeleveragesfsspecanduniversal_pathlibto enable compatibility with
local and remote filesystems.In some cases you need to install a filesystem-specific library
to enable compatibility with that filesystem. For example, to enable compatibility with AWS S3 you must
installs3fswhich is anfsspecimplementation for S3.The following filesystems are known to be supported bytextual-universal-directorytree, but it's possible
thatothers filesystemsare supported as well and just haven't been tested. If you find a filesystem that works, please open an issue.File SystemFormatOptional DependenciesLocalpath/to/fileNoneLocalfile://path/to/fileNoneAWS S3s3://bucket/paths3fsAWS S3s3a://bucket/paths3fsGoogle GCSgs://bucket/pathgcsfsAzure Data Lakeadl://bucket/pathadlfsAzure Blobabfs://bucket/pathadlfsAzure Blobaz://bucket/pathadlfsGitHubgithub://owner:repo@branchrequestsGitHubgithub://owner:repo@branch/pathrequestsSSHssh://user@host:port/pathparamikoSFTPsftp://user@host:port/pathparamikoLicensetextual-universal-directorytreeis distributed under the terms of theMITlicense.
Package: textui
# Python textui packageText-based UI builder for PythonFull documentation provided at https://firsttempora.github.io/Python-textui/## QuickstartInstall from `pip`: `pip install --user textui`The `uielements` module contains individual `user_*` functions that can beused to interactively get values:```from textui import uielements>>> uielements.user_input_list('Choose your favorite fruit', ['Apple', 'Banana', 'Cherry'])Choose your favorite fruitA empty answer will cancel.1: Apple       2: Banana       3: CherryEnter 1-3: 2'Banana'>>> uielements.user_input_date('When did the Eagle land on the moon?')When did the Eagle land on the moon?Enter in one of the formats: yyyy-mm-ddEntering nothing will cancel--> 1969-07-20datetime.datetime(1969, 7, 20, 0, 0)````uielements` also contains a series of `opt_user_*` functions that will decide if theuser needed to be queried based on the given value, or check is the value is valid:```# If the value None is given, it is assumed# that the user need to provide a value>>> uielements.opt_user_input_list('Choose your favorite fruit', None, ['Apple', 'Banana', 'Cherry'])Choose your favorite fruitA empty answer will cancel.1: Apple       2: Banana       3: CherryEnter 1-3: 2'Banana'# If a non-None value is given, it is checked.# So long as it is valid, it is returned.>>> uielements.opt_user_input_list('Choose your favorite fruit', 'Apple', ['Apple', 'Banana', 'Cherry'])'Apple'# If not valid, an error is raised automatically>>> uielements.opt_user_input_list('Choose your favorite fruit', 'Watermelon', ['Apple', 'Banana', 'Cherry'])Error thrown using UIErrorWrapperUIValueError: The value Watermelon is invalid. It must be one of: Apple, Banana, Cherry```
Package: text-unidecode
text-unidecode is the most basic port of theText::UnidecodePerl library.There are other Python ports of Text::Unidecode (unidecodeandisounidecode).unidecodeis GPL;isounidecodeuses too much memory,
and it didn’t support Python 3 when this package was created.You can redistribute it and/or modify this port under the terms of either:Artistic License, orGPL or GPLv2+If you’re OK with GPL-only, useunidecode(it has better memory usage and
better transliteration quality).text-unidecodesupports Python 2.7 and 3.4+.Installationpip install text-unidecodeUsage>>> from text_unidecode import unidecode
>>> unidecode(u'какой-то текст')
'kakoi-to tekst'
Package: texture
(…) I rejected those answers. Instead, I chose something
different. I chose the (im)possible. I chose… texturetexture is a micro-engine for creating text-based adventures.FeaturesScenario based architectureGlobal game stateSome utilitiesMain game loop (including command input)That’s it. This is only a (pretty simple) tool, and you are the artist.
Want your game to calculate x digits ofpi? Well, go for it!DocumentationDocumentation is available in thedocs/directory. In order to build
it, use:$ mkdocs buildIn addition, you can find the documentation online athttp://texture.readthedocs.org/en/latest/.
Package: texture2ddecoder
texture2ddecoderA python wrapper forPerfare'sTexture2DDecoderSome changes were made to the original code to make it cross-platform compatible.InstallationExampleFunctionsInstallationpip install texture2ddecoderor download/clone the git and usepython setup.py installExampleimporttexture2ddecoder# load sample datadata=open("astc_sample","rb").read()# decode datawidth=512height=512block_width=block_height=4decoded_data=texture2ddecoder.decode_astc(data,width,height,block_width,block_height)# load raw image datadec_img=Image.frombytes("RGBA",(width,height),decoded_data,'raw',("BGRA"))FunctionsAll functions accept only arguments, no keywords.decode_pvrtc can cause segfaults on Mac OSdecode_bc1decompresses bc1 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_bc3decompresses bc3 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_pvrtcdecompresses pvrtc textures to BGRAParams: bytes data, long width, long height, bool is2bpp
Return: bytesdecode_etc1decompresses etc1 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_etc2decompresses etc2 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_etc2a1decompresses etc2a1 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_etc2a8decompresses etc2a8 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_eacrdecompresses eacr textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_eacr_signeddecompresses eacr_signed textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_eacrgdecompresses eacrg textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_eacrg_signeddecompresses eacrg_signed textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_bc4decompresses bc4 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_bc5decompresses bc5 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_bc6decompresses bc6 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_bc7decompresses bc7 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_atc_rgb4decompresses atc_rgb4 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_atc_rgba8decompresses atc_rgba8 textures to BGRAParams: bytes data, long width, long height
Return: bytesdecode_astcdecompresses astc textures to BGRAParams: bytes data, long width, long height, int block_width, int block_height
Return: bytesunpack_crunchdecompresses crunch textures to BGRAParams: bytes data
Return: bytesunpack_unity_crunchdecompresses unity_crunch textures to BGRAParams: bytes data
Return: bytes
Package: texture-courier
texture-couriersimple CLI program and high-level python to interact with the second life texture cachegoalsoutput the entire texture cache in a commonly readable formatsupport all platforms that support pythonbe as fast as it is practical to beuse few dependenciesnon goalsno gui, no bells and whistlesno option to transform outputs into other formats, as i believe this is better covered by other programsinstall & useinstall texture-courier with pippip install texture-courierthen, run it on the command line liketexture-couriertexture-courier will attempt to find any texture caches on the system
automatically. if this does not work, find your texture cache and provide it
like sotexture-courier /Users/meri/Library/Caches/Firestorm_x64/texturecachethis dumps the contents of the cache to a directory (by default, to./texturecache).seetexture-courier --helpfor other options.hackingi usepip install --editable .to install texture-courier as an editable
package, which allows the cli to be used like it was installed from pip.prior arthttp://slcacheviewer.comhttps://github.com/jspataro791/PySLCacheDebugger