Saravanan666/pypi-org huggingface dataset:
Package: chainlet
Thechainletlibrary offers a lightweight model to create processing pipelines from
generators, coroutines, functions and custom objects.
Instead of requiring you to nest code or insert hooks,chainletoffers a concise, intuitive binding syntax:# regular nested generatorscsv_writer(flatten(xml_reader(path='data.xml'),join='.'.join),path='data.csv')# chainlet pipelinexml_reader(path='data.xml')>>flatten(join='.'.join)>>csv_writer(path='data.csv')Processing pipelines created withchainletare an extension of generators and functions:
they can be iterated to pull results, called to push input or even used to get/fetch a stream of data.
The bindings ofchainletallow to compose complex processing chains from simple building blocks.Creating new chainlets is simple, requiring you only to define the processing of data.
It is usually sufficient to use regular functions, generators or coroutines, and letchainlethandle the rest:@chainlet.genletdefmoving_average(window_size=8):buffer=collections.deque([(yield)],maxlen=window_size)whileTrue:new_value=yield(sum(buffer)/len(buffer))buffer.append(new_value)FeaturesWe have designedchainletto be a simple, intuitive library:Modularize your code with small, independent processing blocks.Intuitively compose processing chains from individual elements.Automatically integrate functions, generators and coroutines in your chains.Extend your processing capabilities with complex chains that fork and join as needed.Under the hood,chainletmerges iterator and functional paradigms in a minimal fashion to stay lightweight.Fully compliant with the Generator interface to integrate with existing code.Implicit tail recursion elimination for linear pipelines, and premature end of chain traversal.Push and pull chains iteratively, continuously, or even asynchronously.Simple interface to extend or supersede pipeline traversal and processing.At its heartchainletstrives to be as Pythonic as possible:
You write python, and you get python.
No trampolines, callbacks, stacks, handlers, …We take care of the ugly bits so you do not have to.Looking to get started?
Check out our docs:Found an issue or have suggestions?
Head straight to our issue tracker:StatusThechainletlibrary originates from our need for accessible concurrency in data center administration.
We have since adopted the library in a production environment for a number of use cases:
* Modular monitoring suite using stream based data extraction and translation.
* Management scripts for concurrent operations on many files at once.Both the grammar and general interfaces for processing chains, trees and graphs are stable.
Ongoing work is mainly focused on streamlining the parallel iteration interface.
A major focus is to add automatic concurrency, asynchronicity and parallelism.
Our target is an opt-in approach to features from functional programming and static optimisations.Recent Changesv1.3.0Thread-based concurrent traversal, improved single- and multi-stream distinction.v1.2.0Synchronous concurrent traversal, chain slicing and merging, fully featured function and generator wrappersv1.1.0Added chainlet versions of builtins and protocol interfacesv1.0.0Initial release
Package: chainlib-eth
chainlib-ethOverviewThis is the Ethereum (EVM) implementation of thechainlibblock
interface.It contains implementations for:RPC client implementation.Nonce and fee generators.Transaction and block objects.EVM ABI encoding and decoding.CLI tool suite for common operations.Please refer to the documentation for thechainlibpackage to achieve
a broader context of whatchainlib-eth implements.CLI toolingWhen installed, the python packagechainlib-ethwill install a
selection of CLI tools in the python executable script path.It will also install man pages for each tool in the man path. The man
pages describe arguments, configurations and environment variables
relevant for each tool. They will not be repeated here.The man pages have been generated using thechainlib-man.pyscript
from thechainlibpackage. Please refer to thechainlibpackage
documentation for further details on the logical structure of the
applicable arguments.eth-balanceGas token balance of a specific address.eth-blockRetrieve a block by number or hash.eth-checksumTransform an ethereum address to a checksummed address.eth-countGet the amount of confirmed transactions on network for an account.
Corresponds to the nonce of the next future transaction.eth-decodeDecode a transaction from its serialized (wire) format.eth-encodeSncode method calls and/or individual arguments for the EVM ABI. Can be
used to interface with smart contracts and generate constructor
arguments.eth-gasGenerate transactions for private accounts and smart contracts, with or
without gas token value.eth-getRetrieve a transaction, or bytecode for an address.eth-infoRetrieve general stats for a blockchain network.eth-rawCovert a signed wire format transaction to raw transaction for RPC.eth-waitBlock until transaction has been completed (transaction "receipt"
exists).
Package: chainlink-tools
Chainlink Toolschainlink-toolsis a command line utility designed to make life easier for Chainlink node operators.NotesAuthentication with the node is managed by the same.apifile as outlined in theofficial Chainlink documentation.Install$ pip install chainlink-toolsBootstrapping a nodeThebootstrap-jobssubcommand allows for easy bootstrapping when setting up a node for the first time.$ chainlink-tools \
    --credentials "/path/to/.api/file" \
    --node-url "http://localhost:6688" \
    bootstrap-jobs \
    --oracle-address "YOUR_ORACLE_CONTRACT_ADDRESS"This will add the five default jobs to the node, as outlined in theChainlink docs:EthBytes32 (GET)EthBytes32 (POST)EthInt256EthUint256EthBoolThe address you pass in for--oracle-addresswill be set as the address for theRunLoginitiator.Adding new jobs to a nodechainlink-toolsprovides two different mechanisms for adding new jobs to a node.Syncing a directory of jobsThesync-jobssubcommand allows for syncing a directory of job specs to a running node.$ chainlink-tools \
    --credentials "/path/to/.api/file" \
    --node-url "http://localhost:6688" \
    sync-jobs \
    --jobs_dir "/path/to/jobs/dir"--jobs-dirshould be the path to a directory of.jsonfiles of job specs:chainlink-jobs
|   ethusd.json
|   btcusd.json
|   linkusd.jsonsync-jobswill first check to see if the job already exists in the node. This is done by doing a comparison of all initators, tasks, and other top level fields. For any jobs in the specified directory not already found on the node,sync-jobswill add them to the node.This allows you to keep a single running directory of all your jobs and runsync-jobson the whole directory every time you add a new one.Note: For comparison purposes, all ETH addresses that appear in a job spec should be lowercase.Specifying a single job to add to a nodeAlternatively, if you would like to manually create each individual job, thecreate-jobsubcommand allows for specifying a single job to add to a node.$ chainlink-tools \
    --credentials "/path/to/.api/file" \
    --node-url "http://localhost:6688" \
    create-job \
    --job "/path/to/job1.json"
Package: chainlit
Welcome to Chainlit by Literal AI 👋Build production-ready Conversational AI applications in minutes, not weeks ⚡️Chainlit is an open-source async Python framework which allows developers to build scalable Conversational AI or agentic applications.✅ ChatGPT-like application✅ Embedded Chatbot & Software Copilot✅ Custom frontend (build your own agentic experience)✅ API EndpointFull documentation is availablehere.Contact ushereforEnterprise Supportand to get early access to Literal AI, our product to evaluate and monitor LLM applications.https://github.com/Chainlit/chainlit/assets/13104895/8882af90-fdfa-4b24-8200-1ee96c6c7490InstallationOpen a terminal and run:$pipinstallchainlit
$chainlithelloIf this opens thehello appin your browser, you're all set!🚀 Quickstart🐍 Pure PythonCreate a new filedemo.pywith the following code:importchainlitascl@cl.stepdeftool():return"Response from the tool!"@cl.on_message# this function will be called every time a user inputs a message in the UIasyncdefmain(message:cl.Message):"""This function is called every time a user inputs a message in the UI.It sends back an intermediate response from the tool, followed by the final answer.Args:message: The user's message.Returns:None."""# Call the tooltool()# Send the final answer.awaitcl.Message(content="This is the final answer").send()Now run it!$ chainlit run demo.py -w🎉 Key Features and IntegrationsFull documentation is availablehere. Key features:💬 Multi Modal chats💭 Chain of Thought visualisation💾 Data persistence + human feedback🛝 In context Prompt Playground👤 AuthenticationChainlit is compatible with all Python programs and libraries. That being said, it comes with integrations for:LangChainLlama IndexAutogenOpenAI AssistantHaystack📚 More Examples - CookbookYou can find various examples of Chainlit appsherethat leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more.Tell us what you would like to see added in Chainlit using the Github issues or onDiscord.💁 ContributingAs an open-source initiative in a rapidly evolving domain, we welcome contributions, be it through the addition of new features or the improvement of documentation.For detailed information on how to contribute, seehere.📃 LicenseChainlit is open-source and licensed under theApache 2.0license.
Package: chainload
Load a value from an environmental variable, YAML/JSON file, or default to a provided value.Getting chainloadSimply:pipinstallchainloadInstall requirementspipinstall-rrequirements.txtor:pythonsetup.pyinstallUsing chainloadIf you have variables that exist in a file, I recommend assigning a file object to a variable, then passing that variable to the chain loading method.e.g.$python>>>fromchainloadimportchainload>>>variable_file=chainload.load_file(file_name="tests/test_settings.yaml")>>>chainload.chain_load_variable("environment","environment","debug",variable_file)'production'or, if you have a lot of variables to load, use the class-based approach:$python>>>chainer=chainload.ChainloadSetup(filename="tests/test_settings.yaml",environment_variable_prefix="webapp_")>>>environment_value=chainer("environment")the latter has the advantage of being far moreDRYfor larger use-cases.See the docstring forchain_load_variable, but this will load a variable in order of:A default valueFrom file objectFrom an environment variable.Optional: If the environmental variable is None, and the specified file option name exists in the env, and this behavior is enabled, an attempt to load from an environmental variable of the same name as specified for #2Running testsIf you want to run the tests for this package:$maketestpythonsetup.pytestrunningnosetestsrunningegg_infowritingchainload.egg-info/PKG-INFOwritingtop-levelnamestochainload.egg-info/top_level.txtwritingdependency_linkstochainload.egg-info/dependency_links.txtreadingmanifestfile'chainload.egg-info/SOURCES.txt'writingmanifestfile'chainload.egg-info/SOURCES.txt'.........----------------------------------------------------------------------Ran9testsin0.007sFiling bugs / issuesWhen filing a bug report, please include aShort, Self Contained, Correct (Compilable), Example.New features / Pull requestsIf requesting a new feature, please include a well-explained use-case with example usage.When making a pull request, if new functionality is added, please include appropriate tests.
Package: chainmap
This module is apolyfill,
implementingChainMapfor reasonably-recent versions of Python that do not
havecollections.ChainMap–namely, Python 2.6, Python 3.2, and PyPy3
releases based on Python 3.2. (It will also work as expected on Python 2.7,
PyPy, and Python 3.3+, but it is not strictly needed there since those verions’collectionsmodules contains goodChainMapimplementations.)The code for this package is closely derived from the Python 3.5 source code,
(especially thecollectionsandreprlibmodules). Several changes have
been made to ensure Python 2.6 compatibility, and tests and packaging have been
added.Typical usage:from chainmap import ChainMapIf you prefer to preferentially import from the Python standard library whenChainMapis available there:try:
    from collections import ChainMap
except ImportError:
    from chainmap import ChainMapPlease seethe standard documentationfor details on how to useChainMap.If you’re not surewhysomeone would use aChainMap, they are useful for
managing “nested” contexts and “overlays.” See e.g. myoptions,quoter, andsaypackages, which use them extensively for
flexible option handling. You can find similar uses in theContext classof Django’s template engine.NotesAutomated multi-version testing managed withpytest,pytest-cov,coverage, andtox.
Packaging linting withpyroma.Thanks to Travis CI, successfully packaged for, and tested against, all
reasonably late-model versions of Python: 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6,
and 3.7, as well as PyPy 5.8.0 (essentially Python 2.7.13) and PyPy3 5.10.1
(corresponding to Python 3.5.3).The author,Jonathan Euniceor@jeunice on Twitterwelcomes your comments and suggestions.InstallationTo install or upgrade to the latest version:pip install -U chainmapToeasy_installunder a specific Python version (3.3 in this example):python3.3 -m easy_install --upgrade chainmap(You may need to prefix these withsudoto authorize
installation. In environments without super-user privileges, you may want to
usepip’s--useroption, to install only for a single user, rather
than system-wide.)
Package: chainmerger
chainmergermerge chainalysis's exported transaction csv files into one xlsx file with separate sheets per exchangeinstallationpip install chainmergerusagechainmerger -i <input directory> -o <output directory>default directoriesIf input dir is not specified:~/chainmerger_InputIf no output dir is specified:~/chainmerger_Input/chainmerger_OutputElse:<input dir> / <output dir>example
Package: chainop
Exampleimportchainop,argparseparser=argparse.ArgumentParser()chop=chainop(parser).add_argument("--arg0")("--arg1")("--foobar")("--arg3",type=int)foobar_arg:argparse.Action=chop[2]# Get the returned value for the 3rd add_argument callprint(foobar_arg.dest)chop[3].default=0args=parser.parse_args()
Package: chainos
ChainOSAn extremely fast, language-agnostic, graph workflow engine for building, testing, and deploying complex workflows.StoryChainos : the Forger of Sequential BondsChainos focuses on the power of chained processes, from AI to algorithmic sequences where each step is linked to the next. As the forger of sequences, Chainos ensures that every link in the chain holds, promoting security, efficiency, and integrity in systems that rely on unbroken processes.Website: chainos.ioHelpDocumentationExamplesInstallingSetup environment# Choose a python versionpyenvinstall3.10
pyenvinstall3.11# Create a virtualenv# Can replace 3.11 with your versionpyenvvirtualenv3.11chainos# See all installed python versions and available virtualenvspyenvversions# activate virtualenvpyenvactivatechainos# leave virtualenvpyenvdeactivate

pipinstallpoetrySetup projectgitclonegit@github.com:chainos-io/chainos-python.gitcdchainos-python

poetryinstall--withtest,dev--no-rootRunning ChainOSExample chainos projectfromchainosimportChainOSascoscontainer=cos.Container()chain=cos.Chain(container=container)@cos.taskdefstep1()->int:print("Hello, World!")return1@cos.taskdefstep2(input1:int):print(f"step2:{input1}")returninput1*2chain.add(step1)chain.add(step2)container.add(chain)chain.run()ContributingFor guidance on setting up a development environment and how to make a
contribution to Chainos, seeContributing to Pydantic.Or seeContribution guidelines for this projectReporting a Security VulnerabilitySee oursecurity policy.
Package: chainpoint3
pychainpointA Python 3 module for validating Chainpoint blockchain receipts. Fork ofpychainpoint.Installation$ pip install chainpoint3UsageUse the is_valid_receipt function to validate your Chainpoint receipt.chainpoint_validate.is_valid_receipt(receipt)#  receipt - the receipt to be validated, as a stringExamplefromchainpoint3importChainpointreceipt='''{"header": {"chainpoint_version": "1.1","hash_type": "SHA-256","merkle_root": "5faa75ca2c838ceac7fb1b62127cfba51f011813c6c491335c2b69d54dd7d79c","tx_id": "b84a92f28cc9dbdc4cd51834f6595cf97f018b925167c299097754780d7dea09","timestamp": 1445033433},"target": {"target_hash": "cbda53ca51a184b366cbde3cb026987c53021de26fa5aabf814917c894769b65","target_proof": [{"parent": "4f0398f4707c7ddb8d5a85508bdaa9e22fb541fa0182ae54f25513b6bd3f8cb9","left": "cbda53ca51a184b366cbde3cb026987c53021de26fa5aabf814917c894769b65","right": "a52d9c0a0b077237f58c7e5b8b38d2dd7756176ca379947a093105574a465685"}, {"parent": "5faa75ca2c838ceac7fb1b62127cfba51f011813c6c491335c2b69d54dd7d79c","left": "4f0398f4707c7ddb8d5a85508bdaa9e22fb541fa0182ae54f25513b6bd3f8cb9","right": "3bd99c8660a226a62a7df1efc2a296a398ad91e2aa56d68fefd08571a853096e"}]}}'''validator=Chainpoint()result=validator.is_valid_receipt(receipt)Sample Valid Resultdict(is_valid=True,type:'BTCOpReturn',source_id:'f3be82fe1b5d8f18e009cb9a491781289d2e01678311fe2b2e4e84381aafadee',exists:true)Sample Invalid Resultdict(is_valid=False,error='Cannot parse receipt JSON')
Package: chain-py
An expressive clean way to interact with REsTful APIs. It was inspired byzmallen’s pygraylog.Chain is a small enhancement to the popularrequestspackage. By referencing the endpoints as
attributes to the client, it effectively “chains” the endpoints together, building the target url.Chain is an attempt to make REsTful API clients look more like python objects, by removing the
hardcoded URL strings in the code.Chain uses therequestspackage as its http client, keeping its parameters and response objects.
If you already userequestsas your http client, then adopting chain would be easy.UsageLets take for examplethis API:# create a new client for the API>>>importchain>>>blogs=chain.Client('http://jsonplaceholder.typicode.com')# if you want the posts:>>>response=blogs.get.posts()# the response is the response object from the requests package>>>printresponse.json()Numbers and special characters are also supported using dictionary notation# Get the first post>>>response=blogs.get.posts[1]()>>>printresponse.json()chain parameters are requests.requests parameters:# parameters are the same as requests.requests parameters>>>response=blogs.get.comments(params={'postId':'1'})>>>printresponse.json()>>>comment={'postId':1,'id':501,'name':'chain','email':'chain@code.com','body':'meh.'}>>>response=blogs.post.comments(json=comment)Installationpip install chain_pyTestingpython setup.py testOr:toxCompatibilityWorks with Python version 2.7, 3.3, 3.4, 3.5 and 3.6LicenceMIT licensed. Requests is licensed by the Apache License. See fullLICENSEAuthorschainwas written byAnfernee Jervis.
Package: chainsaddiction
ChainsAddictionChainsAddiction is an easy to use tool for time series analysis using
discrete-time Hidden Markov Models. It is written inCas anumpy-based
Python extension module.InstallationPrerequisitesThe installation of ChainsAddiction requires to following tools to be installed
on your system:Python >= 3.9pip, setuptoolsC compilerInstall from PyPiYou can install chainsaddiction from PyPi with:python3 -m pip install chainsaddictionPlease note that ChainsAddiction is a CPython extension module. You have to
have set up a C compiler in order to install. Currently we provide wheels for
macOS. So, if you are using this OS you do not need a compiler.Install from sourceFirst, clone the source code by typing the following command in your terminal app.
Replacepath/to/cawith the path to where ChainsAddiction should be cloned:git clone https://github.com/teagum/chainsaddiction path/to/caSecond, change to the root directory of your freshly cloned code repository:cd path/to/caThird, instruct Python to build and install ChainsAddiction:python3 -m pip install .NotesCurrently only Poisson-distributed HMM are implemented.
Package: chainsail-helpers
Chainsail PDF interfaces and utilitiesThis small package complements theChainsailsampling service. Itdefines the general interface for objects representing Chainsail-consumable probability distributions,provides implementations thereof for popular probabilistic programming languages,and contains a few helper scripts for post-processing.Installation$pipinstallchainsail-helpersIf you'd like implement a probability density usingStanorPyMC3, install the corresponding extra dependencies like so:poetry install --extras pymc3and similarly forstan.
When using Chainsail, this package will be automatically installed, so no need to add it to the list of dependencies in the job submission form.
If you like to develop this package, best usePoetry:$poetryinstall
$poetryshelland you will be dropped into a virtual environment with all dependencies installed.ContributingContributions, for example PDF implementations for other probabilistic programming languages, are highly welcome!
Just open a pull request and we'll be happy to work with you to make Chainsail even more useful.License© 2021Tweag.chainsail_helpersis open-source software and licensed under theMIT license.
Package: chainsaw-audio
ChainsawInstallchainsawdependenciespython3-pyopython3-liblojackd2midi_chainsawdependenciesmididingschainsawgit clone https://framagit.org/groolot-association/chainsaw.git
cd chainsaw
make allDebian likesudo dpkg -i ./chainsaw_x.y_all.debWithpippip3 install ./chainsaw-x.y-py3-none-any.whlCreditsLead developersGrégory Daviddev@groolot.netJean-Emmanuel Doucetjean-emmanuel.doucet@groolot.netFrameworkOlivier Bélanger (Pyo:https://github.com/belangeo/pyo)DiagramsAudio pipelineUML Class diagram
Package: chainspotter
chainspotterRedis Streams wrapper to track, store and query user-item interactions history by item count or time.Usage exampleProducer:importredisimportchainspotter@chainspotter.to_chain('user_history',redis.Redis(),limit=20)defshow_item_to_user(user_id,item_id):print('item_id')foriinrange(5):show_item_to_user(2,i)Consumer:importredisimportchainspotterchain=chainspotter.ClickChain('user_history',redis.Redis())chain.last_n_pcs(2)>[0,1,2,3,4]
Package: chainstream
chainstreamChainstream provides the classChainStream, a subclass ofio.RawIOBase,
to chain I/O streams together into a single stream. See below for example
usage, and the module help for more information.Chainstream is distributed under the CC-BY-SA version 4.0; seehttps://creativecommons.org/licenses/by-sa/4.0/Examplefrom chainstream import ChainStream

def generate_open_file_streams():
    for file in filenames:
        yield open(file, 'rb')
f = io.BufferedReader(ChainStream(generate_open_file_streams()))
f.read()