Saravanan666/pypi-org huggingface dataset:
Package: python-lirc
python-lirc===========LIRC extension written in Cython for Python 3 (and 2). I'm trying to get this into[Debian](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=Bug%23718980)[PyPI](https://pypi.python.org/pypi/python-lirc/)Install=======`python-lirc` and `python3-lirc` are in the main repositories for Raspbian. If you're on aRaspberryPi you can just run:$ sudo apt-get install python3-lirc # or python-lircOtherwise, download the latest relase from[here](https://github.com/tompreston/python-lirc/releases) and install with:$ sudo dpkg -i python3-lirc_1.2.1-1_all.debConfigure=========You need a valid [lircrc configuration file](http://www.lirc.org/html/configure.html#lircrc_format). For example:$ cat ~/.lircrcbeginbutton = 1          # what button is pressed on the remoteprog = myprogram    # program to handle this commandconfig = one, horse # configs are given to program as listendbeginbutton = 2prog = myprogramconfig = twoendUse===$ python3>>> import lirc>>> sockid = lirc.init("myprogram")>>> lirc.nextcode()  # press 1 on remote after this['one', 'horse']>>> lirc.deinit()Load custom configurations with:>>> sockid = lirc.init("myprogram", "mylircrc")>>> lirc.load_config_file("another-config-file") # subsequent configsSet whether `nextcode` blocks or not with:>>> sockid = lirc.init("myprogram", blocking=False)>>> lirc.set_blocking(True, sockid)  # or thisBuilding and Installing=======================If you want to install manually then you may also need to installcython and some dev libraries:$ sudo aptitude install liblircclient-dev cython gcc \python{,3}-setuptools python{,3}-devDownload, compile and install for Python 3 and 2.git clone https://github.com/tompreston/python-lirc.gitcd python-lirc/make py3 && sudo python3 setup.py installmake py2 && sudo python setup.py installOr just install straight from PyPI:sudo easy_install3 python-lircsudo easy_install python-lircDevelopment===========1. Install the dev libraries as above.2. Make changes to `lirc/lirc.pyx`.3. Compile with `make py3 && python3 setup.py build`4. Test with `python3 tests/tests.py`Change Log==========v1.2.3------- Rebuilt (again) and uploaded to PyPi.- Added requirements.txtv1.2.2------- Rebuilt and uploaded to PyPi.v1.2.1------- Fixed `set_blocking` bug (issue #2).- Added nonblocking tests.- Added python-dev and python3-dev to README.v1.2.0------- Structured for Debian packaging.v1.1----- Tidied up project structure.- init now tries to use config at ~/.lircrc and then /etc/lirc/lircrc.
Package: python-litecoinlib
python-litecoinlibThis Python3 library provides an easy interface to the litecoin data
structures and protocol. The approach is low-level and "ground up", with a
focus on providing tools to manipulate the internals of how litecoin works.Requirementssudo apt-get install libssl-devThe RPC interface,litecoin.rpc, is designed to work with Litecoin Core v0.18.
Older versions may work but there do exist some incompatibilities.StructureEverything consensus critical is found in the modules under litecoin.core. This
rule is followed pretty strictly, for instance chain parameters are split into
consensus critical and non-consensus-critical.litecoin.core            - Basic core definitions, datastructures, and
                          (context-independent) validation
litecoin.core.key        - ECC pubkeys
litecoin.core.script     - Scripts and opcodes
litecoin.core.scripteval - Script evaluation/verification
litecoin.core.serialize  - SerializationIn the future the litecoin.core may use the Satoshi sourcecode directly as a
library. Non-consensus critical modules include the following:litecoin          - Chain selection
litecoin.base58   - Base58 encoding
litecoin.bloom    - Bloom filters (incomplete)
litecoin.net      - Network communication (in flux)
litecoin.messages - Network messages (in flux)
litecoin.rpc      - Litecoin Core RPC interface support
litecoin.wallet   - Wallet-related code, currently Litecoin address and
                   private key supportEffort has been made to follow the Satoshi source relatively closely, for
instance Python code and classes that duplicate the functionality of
corresponding Satoshi C++ code uses the same naming conventions: CTransaction,
CBlockHeader, nValue etc. Otherwise Python naming conventions are followed.Mutable vs. Immutable objectsLike the Litecoin Core codebase CTransaction is immutable and
CMutableTransaction is mutable; unlike the Litecoin Core codebase this
distinction also applies to COutPoint, CTxIn, CTxOut, and CBlock.Endianness GotchasRather confusingly Litecoin Core shows transaction and block hashes as
little-endian hex rather than the big-endian the rest of the world uses for
SHA256. python-litecoinlib provides the convenience functions x() and lx() in
litecoin.core to convert from big-endian and little-endian hex to raw bytes to
accommodate this. In addition see b2x() and b2lx() for conversion from bytes to
big/little-endian hex.Module import styleWhile not always good style, it's often convenient for quick scripts ifimport *can be used. To support that all the modules have__all__defined
appropriately.Selecting the chain to useDo the following:import litecoin
litecoin.SelectParams(NAME)Where NAME is one of 'testnet', 'mainnet', 'signet', or 'regtest'. The chain currently
selected is a global variable that changes behavior everywhere, just like in
the Satoshi codebase.
Package: python-litecointx
This Python3 library implements support for Litecoin transactions.It builds on top, and is intended to be used along with python-bitcointx library.Requirementspython-bitcointx(version >= 1.0.0)Usage:With contextual switch to Litecoin parameters:importosimportlitecointxfrombitcointximportChainParams,get_current_chain_paramsfrombitcointx.walletimport(CCoinKey,CCoinExtKey,P2WPKHCoinAddress,CCoinAddress)withChainParams('litecoin'):k=CCoinExtKey.from_seed(os.urandom(32))a=P2WPKHCoinAddress.from_pubkey(k.derive_path("m/0h/0h/1").pub)print('example{}address:{}'.format(get_current_chain_params().NAME,a))assertCCoinAddress(str(a))==aWith global switch to Litecoin parameters:fromlitecointximportLitecoinMainnetParamsfrombitcointximportselect_chain_paramsselect_chain_params('litecoin')# or, using the chain params class directlyselect_chain_params(LitecoinMainnetParams)Without the switch of chain parameters:fromlitecointx.walletimportP2SHLitecoinLegacyAddress,P2SHLitecoinAddresslegacy_adr=P2SHLitecoinLegacyAddress('3F1c6UWAs9RLN2Mbt5bAJue12VhVCorXzs')canonical_adr=P2SHLitecoinAddress.from_scriptPubKey(legacy_adr.to_scriptPubKey())assertstr(canonical_adr)=='MMDkQMv8pGGmAXdVyxaW8YtQMCHw7eouma'With special parameter that makes CCoinAddress to decode legacy p2sh addresses:frombitcointximportselect_chain_paramsfrombitcointx.walletimportCCoinAddressfromlitecointx.walletimportP2SHLitecoinLegacyAddressselect_chain_params('litecoin',allow_legacy_p2sh=True)legacy_adr=CCoinAddress('3F1c6UWAs9RLN2Mbt5bAJue12VhVCorXzs')assertisinstance(legacy_adr,P2SHLitecoinLegacyAddress)this also works with ChainParams context manager.
Package: python-livefyre
API wrapper for Livefyre v3Free software: BSD licenseFeaturesImplements the following Livefyre LiveComments v3 APIs:Ping to Pull (profile)Register Profile Interface URLCreate CollectionHistory0.1.2 (2014-01-20)Fixes broken imports introduced in PyJWT v0.1.7 by pinning to 0.1.6.0.1.2 (2014-01-15)Detect if ‘.fyre.co’ innetworkand remove accordinglyDial down the URL validation forping_to_pullto handle the non-standard formatAdd aLivefyre.list_sitesmethod to list as sites and auth credentials for the networkFixlivefyre._create_auth_tokento properly accept adisplay_nameparameterRemove some debugprintcalls and add some documentation0.1.1 (2014-01-14)Fix broken installs due to poorly writtens setup.py0.1.0 (2014-01-14)First release on Github.Implements the follow Livefyre APIs:Ping to PullRegister Profile Pull InterfaceCreate Collection
Package: python-llm
python-llm: A LLM API for HumansThe simplicity and elegance of python-requests, but for LLMs. This library supports models from OpenAI and Anthropic. I will try to add more when I have the time, and am warmly accepting pull requests if that's of interest.Usageimportllmllm.set_api_key(openai="sk-...",anthropic="sk-...")# Chatllm.chat("what is 2+2")# 4. Uses GPT-3 by default if key is provided.llm.chat("what is 2+2",engine="anthropic:claude-instant-v1")# 4.# Completionllm.complete("hello, I am")# A GPT model.llm.complete("hello, I am",engine="openai:gpt-4")# A big GPT model.llm.complete("hello, I am ",engine="anthropic:claude-instant-v1")# Claude.# Back-and-forth chat [human, assistant, human]llm.chat(["hi","hi there, how are you?","good, tell me a joke"])# Why did chicken cross road?# Streaming chatllm.stream_chat(["what is 2+2"])# 4.llm.multi_stream_chat(["what is 2+2"],engines=["anthropic:claude-instant-v1","openai:gpt-3.5-turbo"])# Results will stream back to you from both models at the same time like this:# ["anthropic:claude-instant-v1", "hi"], ["openai:gpt-3.5-turbo", "howdy"],# ["anthropic:claude-instant-v1", " there"] ["openai:gpt-3.5-turbo", " my friend"]# Engines are in the provider:model format, as in openai:gpt-4, or anthropic:claude-instant-v1.Multi Stream Chat In ActionGiven this feature is very lively, I've included a video of it in action.https://github.com/danielgross/python-llm/assets/279531/d68eb843-7a32-4ffe-8ac2-b06b81e764b0InstallationTo installpython-llm, use pip:pip install python-llm.ConfigurationYou can set API keys in a few ways:Through environment variables (you can also set a.envfile).exportOPENAI_API_KEY=sk_...exportANTHROPIC_API_KEY=sk_...By calling the method manually:importllmllm.set_api_key(openai="sk-...",anthropic="sk-...")By passing a JSON file like this:llm.set_api_key("path/to/api_keys.json")The JSON should look like:{"openai":"sk-...","anthropic":"sk-..."}TODOCaching!More LLM vendors!More tests!
Package: python-lmdb
python-lmdb===========Your (L)MDB bindings for Python, written entirely using ctypes, but only for Python 3 (at the moment). Does not use any CPython native extensions.Usage-----import lmdblib = lmdb.LibLMDB()env = lmdb.Environment(lib, "data")with env.transaction() as txn:txn[b"key"] = b"value"print(txn[b"key"])del txn[b"key"]Web API-------I have implemented a simple web REST API with Bottle. It supports simpletransactions, setting an item, getting an item, and deleting an item.$ gunicorn lmdb.webYou can use the following environment variables to configure the application:* *LMDB_WEB_LIB*: Path to liblmdb.so* *LMDB_WEB_DBPATH*: Path to database directoryIt supports simple REST endpoints:* `GET /` Server status overview* `GET /_simple/<key>` Retrievement of item by key* `PUT /_simple/<key>` Set an item with request body* `DELETE /_simple/<key>` Delete an item* `POST /_trans` Upload transaction and execute it* `GET /_dump` Return transaction which inserts dataTransactions are uploaded as JSON with the following form:{"write": true, # optional, by default false"steps": [{"action": "set", "key": "foo", "value": "bar"},{"action": "delete", "key": "foo"},]}
Package: python-lnd-grpc
## Install python package locally from pypi:import python_lnd_grpc## Initiate the connector classlightning = python_lnd_grpc.LNDMethods()
walletunlocker = python_lnd_grpc.WalletUnlocker()## Use methodsinfo = lightning.getinfo()
print(info)## Method naming
All methods mentioned inhttps://api.lightning.community/#lnd-grpc-api-referenceare fully lowercase in python_lnd_grpc library. For exampleAbandonChannelrequest relates to methodabandonchannel()## Custom connector objectUser can modify connector object in cases when connection to remote lnd node is needed (instead of local one), specifying custom parameters, like paths and file names:lightning = python_lnd_grpc.LNDMethods(tls_file_path = “~/.lnd/”,
tls_file_name = “remote.cert”,
custom_tls_path_full = “~/.lnd/fullpath.cert”,
macaroon_filename = “remote.macaroon”,
macaroon_path = “~/.lnd/data/chain/bitcoin/”,
custom_macaroon_path_full = “~/.lnd/data/chain/bitcoin/mainnet/full_path.macaroon”,
grpc_host = “192.168.0.199”,
grpc_port = “10009”,
network = “mainnet”,
output = “json-none-included”,
macaroon_bytes = “bytes”,
tls_file_bytes = “bytes”)Different types of output will result in either:grpc class outputoutput = Nonejson string without NOT initialized argumentsoutput = jsondictionary without NOT initialized argumentsoutput = dictionaryjson string with NOT initialized argumentsoutput = json-none-includeddictionary with NOT initialized argumentsoutput = dictionary-none-includedIn case of connecting to remote lnd node, the grpc setting inlnd.confhas to be set to listening:rpclisten=0.0.0.0:10009
Package: python-loading-sdk
Python Loading SDKInstallpip install python-loading-sdkUsageInstantiate the client and optionally provide login credentials to be able to use methods that requires the user to be logged in.fromloading_sdkimportLoadingApiClientclient=LoadingApiClient(email="your@email.com",password="your_password")response=client.get_profile()It can also be used asyncrounously:fromloading_sdkimportAsyncLoadingApiClientclient=awaitAsyncLoadingApiClient(email="your@email.com",password="your_password")response=awaitclient.get_profile()ExamplesRequires Authresponse=client.get_profile()response=client.create_post(thread_id="5bbb986af1deda001d33bc4b",message="My message!")response=client.edit_post(post_id="5bc876dd70a79c001dab7ebe",message="My updated message!")response=client.create_thread(title="My title",message="The content!",category_name="games")response=client.edit_thread(post_id="5bbb986af1deda001d33bc4b",message="My updated message!")Anonymousresponse=client.search(query="search query")response=client.get_post(post_id="5bc876dd70a79c001dab7ebe")response=client.get_thread(thread_id="5bbb986af1deda001d33bc4b",page=3)response=client.get_games(page=5)response=client.get_other(page=7)response=client.get_editorials(page=2,post_type="review",sort="title")response=client.get_about()response=client.get_socials()response=client.get_total_thread_pages(thread_id="5bbb986af1deda001d33bc4b")response=client.get_total_category_pages(category="games")
Package: python-localvenv-kernel
Python Local.venvKernelA Jupyter kernel that delegates toipykernelin the.venvenvironment of a project folder.Derived frompoetry-kernel, see theFAQ.InstallationThepython-localvenv-kernelpackage can be installed viapip(pip install python-localvenv-kernel) or as aConda package(conda install python-localvenv-kernel).It must be installed into the same environment as the Jupyter server, seeUsagebelow.UsageJupyter and thepython-localvenv-kernelpackage should be installed in the same environmentThe project folder must have a virtual (project) environment instantiated in a subfolder.venv. The name of folder can be overridden by setting the environment variableKERNEL_VENV(seeFAQ)The project environment must include theipykernelpackage (but notjupyter)Start Jupyter from the project folderSelect the "Python (local .venv)" kernelFAQSeeFAQ.md.
Package: python-loc-counter
python-loc-counterThe python-loc-counter module was built to count various LOC metrics:source_loc (Everything thats not a comment or blank line)single_comment_loc (Comments with the pound key)single_docstring_loc (Docstrings with single quotes)double_docstring_loc (Docstrings with double quotes)total_comments_loc (single_comment_loc + single_docstring_loc + double_docstring_loc)blank_loc (Any whitespace designated only with string.whitespace)total_line_count (Typical line count)This uses extensive regex to try to cover weird edge cases, like comments in the middle of a src line (I recommend a quick review about how comments are decidely handled in tests/randomFile.txt). This is written entirely in python with no dependencies outside the standard library. Made to be used as a library.InstallationThis package is locted ongithubandpypi. If you have pip installed the easiest way to install is:$pipinstallpython-loc-counterExample Usagefrompython_loc_counterimportLOCCounter

defmain():counter=LOCCounter(<file_name>)loc_data=counter.getLOC()print(loc_data)This will print a dictionary that might look something like:{total_src_loc:1757total_single_comments_loc:75total_single_docstrings_loc:0total_double_docstrings_loc:179total_blank_loc:516total_comments_loc:254total_line_count:2530}DevelopmentSee a feature or found a bug? Feel free to make suggestions or (better yet) contributions for future iterations!Example ProjectsOriginally this module was built for:https://github.com/bcdasilv/code-style-mining/tree/python_analysis.
Package: python-logdog
logdogPython package withloggingutilitiesThis package is grouped into four main functionalities:EncodersThey are the "core" of this package.
They are fully functional, but can still be extended and replaced as neededFormattersThey allow you to bring structured logging to your app.
Keys present in log lines (such astime,levelormessage)
can be easily configured by using a custom formatHandlersThey are logging handlers.
One of the key features is buffering, so no more 100 emails every minute.
Just one with a summaryWrappersThey are just utilities that you can use to simplify the use of logging functionsDocumentationDocumentation is hosted by GitHub Pages -click hereRequirementsPython >= 3.10Installationpipinstall-Upython-logdog
Package: python-logentries-api
python-logentries-apiThis is a Python wrapper for the Logentries API. The API object terms follow
the semantics from the Logentries website, not the Logentries API.TheInactivityAlertandAnomalyAlertclasses simulate a user login to
create the appropriate alerts.This is not endorsed or provided by Logentries, and no commercial support is
provided.ExampleTo create a new tag called ‘user_agent = curl’ and associate it with a log
called ‘someset/somelog’:from logentries_api import Tags, Hooks, Labels, LogSets

label = Labels().create('user_agent = curl')
log = LogSets().get('someset/somelog')
tag = Tags().create(label['sn'])
hook = Hooks().create(
    name=label['title'],
    regexes=['user_agent = /curl\/[\d.]*/'],
    tag_id=tag['id'],
    logs=[log['key']]
)InstallationTo install the latest release, type:pip install python-logentries-apiTo install the latest code directly from source, type:pip install git+git://github.com/ambitioninc/python-logentries-api.gitDocumentationFull documentation is available athttp://python-logentries-api.readthedocs.orgLicenseMIT License (see LICENSE)
Package: pythonlogger
to install logover use
pip install logover
once you install the package goto logover package and cut config.json file and put it into your folders main directory and change the "END_POINT" to wherever you want to dump your data and change "END_POINT_TO_SIMULATE_DB" to endpoint from where you will fetch includes and levels.
config.json
{
"buffer_size":"5",
"timer":"10",
"END_POINT":"https://httpdump.io/bpmpg",
"END_POINT_TO_SIMULATE_DB":"http://127.0.0.1:9000/",
"time_to_refresh_cofg_file" : "30"
}in place of "END_POINT" put your own end point where you want to dumb the data. in include array you need to pass the route which you allow to log. If you put "*" it means you want to allow all the route. Do same configuration for levels.
once you done with config file just put the code below to the end of all your route so that it will process all your route. (REMEMBER:- put this at the end of all your route. )
@app.before_request
def start_timer():
print('before every request')
g.start = time.time()@app.after_request
def fun(response):
myRouteLog.log_request(response)
return responsenow in the last step :-
if you want to use logger for specific task like INFO,ERROR,WARNING use like :-
logover.info('your message')
logover.error('your message')
logover.warn('your message')by default buffersize is 5 and time out is 30sec, if you want to change it just change in config.json file and restart the server.
Package: python-logging-extra
python-logging-extraAdditional handlers for the Python standard logging facility.JabberHandlerimport logging
from loggingx import JabberHandler, Account

sender = Account(username = 'your-account@gmail.com',
                 password = 'your-password')

destination = 'target-account@gmail.com'

jabber_handler = JabberHandler(sender=sender, to=destination)

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.addHandler(jabber_handler)

logger.debug("debug message")SMTP_SSLHandlerIncluding SSL support, so it is able to send mail with gmail.import logging
from loggingx import SMTP_SSLHandler, Server, Account

sender = Account(username = 'your-account@gmail.com',
                 password = 'your-password')

destination = 'target-account@gmail.com'

gmail_smtp = Server(hostname='smtp.gmail.com',
                    port=587, ssl=True)

smtp_handler = SMTP_SSLHandler(server  = gmail_smtp,
                               sender  = sender,
                               toaddrs = [destination],
                               subject = 'SSL SMTP notification')

logger = logging.getLogger()
logger.addHandler(smtp_handler)

logger.debug("debug message")Notify handlerDebianpython-logging-extra is available as official Debian package.binary:http://packages.debian.org/sid/python-loggingxsource:http://packages.debian.org/source/sid/python-logging-extraSource repositoryhttp://http://anonscm.debian.org/viewvc/python-modules/packages/python-logging-extra/svn+ssh://${ALIOTH_USER}@svn.debian.org/svn/python-modules/packages/python-logging-extra/
Package: python-logging-json-formatter
A logging Formatter that appends extra data as JSON, e.g. for logglyUSAGEUsingdictConfigimport logging.config

logging.config.dictConfig({
    'version': 1,
    'formatters': {
        'append_json': {
            '()': 'logging_json_formatter.AppendJSONFormatter',
            'format': '%(asctime)s %(name)s %(levelname)s %(funcName)s  %(filename)s:%(lineno)s %(message)s',

            # only use a specific set of keys
            'limit_keys_to': ['org_uuid', 'app_uuid'],

            # force keys that are ignored by default
            'force_keys': ('levelname', 'lineno'),
        }
    },
    'handlers': {
        'syslog': {
            'level': 'ERROR',
            'class': 'logging.handlers.SysLogHandler'
            'address': '/dev/log',
            'formatter': 'append_json'
        },
    },
}
Package: python-logging-loki
python-logging-lokiPython logging handler for Loki.https://grafana.com/lokiInstallationpipinstallpython-logging-lokiUsageimportloggingimportlogging_lokihandler=logging_loki.LokiHandler(url="https://my-loki-instance/loki/api/v1/push",tags={"application":"my-app"},auth=("username","password"),version="1",)logger=logging.getLogger("my-logger")logger.addHandler(handler)logger.error("Something happened",extra={"tags":{"service":"my-service"}},)Example above will sendSomething happenedmessage along with these labels:Default labels from handlerMessage level asserverityLogger's name asloggerLabels fromtagsitem ofextradictThe given example is blocking (i.e. each call will wait for the message to be sent).But you can use the built-inQueueHandlerandQueueListenerto send messages in a separate thread.importlogging.handlersimportlogging_lokifrommultiprocessingimportQueuequeue=Queue(-1)handler=logging.handlers.QueueHandler(queue)handler_loki=logging_loki.LokiHandler(url="https://my-loki-instance/loki/api/v1/push",tags={"application":"my-app"},auth=("username","password"),version="1",)logging.handlers.QueueListener(queue,handler_loki)logger=logging.getLogger("my-logger")logger.addHandler(handler)logger.error(...)Or you can useLokiQueueHandlershortcut, which will automatically create listener and handler.importlogging.handlersimportlogging_lokifrommultiprocessingimportQueuehandler=logging_loki.LokiQueueHandler(Queue(-1),url="https://my-loki-instance/loki/api/v1/push",tags={"application":"my-app"},auth=("username","password"),version="1",)logger=logging.getLogger("my-logger")logger.addHandler(handler)logger.error(...)