Saravanan666/pypi-org huggingface dataset:
Package: namedtupled
Source:https://github.com/brennv/namedtupledDocs:https://namedtupled.readthedocs.ionamedtuplesare immutable, performant and classy.namedtupledis
a lightweight wrapper for recursively creating namedtuples from nested
dicts, lists, json and yaml. Inspired byhangtwenty.InstallationpipinstallnamedtupledGetting startedimportnamedtupleddata={'binks':{'says':'meow'}}cat=namedtupled.map(data)cat# NT(binks=NT(says='meow'))cat.binks.says# 'meow'
Package: namedtuple-from-dict
namedtuple from dict / valid identifier from string# Tested with:# Python 3.9.13# Windows 10pipinstallnamedtuple-from-dictfromnamedtuple_from_dictimportcreate_valid_identifier,dict_to_namedtuplefromstringimportprintablefromrandomimportchoices,randrange# startwith will be added if the original string starts with a number# 9times6 -> aa_9times6testdict={1:"hallo","n k q":223,(1,2,4):{222,333},"validkey1":"test","validkey2":"tes1t","notvalidkey!1":"tes1t",}testtuple=dict_to_namedtuple(dic=testdict,name="testdata",startwith="aa_")print(testtuple)foriinrange(10):randomchars="".join(choices(printable,k=randrange(3,10)))varname=create_valid_identifier(randomchars,startwith="aa_")print(f"{randomchars=}")print(f"{varname=}")# testdata(aa_1='hallo', n_k_q=223, aa_1_2_4={333, 222}, validkey1='test', validkey2='tes1t', notvalidkey_1='tes1t')# randomchars=':ga(F'# varname='ga_F'# randomchars='lh[)iN>A/'# varname='lh_iN_A'# randomchars='fI&mE)'# varname='fI_mE'# randomchars='//YW'# varname='YW'# randomchars='aY\x0c'# varname='aY'# randomchars='k|\ts \x0b'# varname='k_s'# randomchars='!kGhJ`'# varname='kGhJ'# randomchars='8u*s'# varname='aa_8u_s'# randomchars='\\z;_cP'# varname='z__cP'# randomchars='e)=Qb\t7p'# varname='e_Qb_7p'
Package: namefile
namefileInstallpipinstallnamefileUsagefromnamefileimportnamefile,parsefilename=namefile(stem='glue-cola',suffix='csv',tags=('classification','processed'),date=True,version='1.2.0.post1')# filename: 'glue_cola-classification-processed.20220829.1.2.0.post1-v.csv'fileinfo=parse(filename)# fileinfo: FileInfo(stem='glue_cola', suffix='csv', tags={'classification', 'processed'}, date=datetime.datetime(2022, 8, 29, 0, 0), version=<Version('1.2.0.post1')>)assertfilename==fileinfo.name()==str(fileinfo)Developmentconda envcondaenvcreatepoetrypoetryinstallMakefile# 帮助文档makehelp# 格式化代码makestyle# 静态检查makelint
...
Package: nameForBash
if you have a file named ex. “/home/user/file#*?.name”,
use this package, you can get a new filename in string type “/home/user/file\#\*\?.name”example:>>> from nameForBash import nameForBash
>>>
>>> filename = nameForBash('/home/user/file#*?.log')
>>> print filename.fileName
/home/user/file#*?.log
>>> print filename.bashName
/home/user/file\#\*\?.log
Package: nameforme
nameformeA helper python package that can be used to generate names based on thedateset. This could be used to come up with baby names, character names, pseudonyms, etc.Source Data: Contains baby names born in the United States for each year from 1880 to 2017, and the number of children of each sex given each name. Names must appear at least 5 times in each year to be included. (Source:http://www.ssa.gov/oact/babynames/limits.html)This package is similar to the existingnamespackage by Trey Hunner (last updated in 2014), however, our uses a more recent dataset (with names up to 2017), and more options for users to customize what type of names to generate, including the ability to generate similar sounding names.You can check the online documentation of this package onreadthedocs.FeaturesNote that the name of the functions is not finalized. They are subject to change.The package is an assimilation of four independent functions:find_unisex_name: Generate a random set of 10 suggested neutral baby names based on the given limitation and baby names in the past years.find_old_name: Generate a random set of 10 suggested neutral(by default) baby names based on the given time period and sex.find_similar_name: Generate a random set of 10 suggested similar baby names based on the syllable of the input name.find_name: Generate a random set of 10 suggested baby names based on the given limitations.Installation$pipinstallnameformeUsageBelow is a basic example of how to use each of the four functions included in this package.# Load all required package functions
from nameforme.nameforme import find_name
from nameforme.nameforme import find_old_name
from nameforme.nameforme import find_similar_name
from nameforme.nameforme import find_unisex_name

# Generate a random set of 10 suggested baby names based on the given limitations.
# if the given limitation can match to at least 10 names, a list of 10 names will be provided
find_name("F", "A", length=3)
#if the given limitation can only match less than 10 names, all matched names will be provided
find_name("m", "b", length=9)

# Generate a random set of suggested neutral(by default) baby names based on the given time period and sex.
find_old_name('1980s', limit=3)

# Generate a random list of names that sound similar to a given user input name.
find_similar_name('Daniel', limit=20)

# Generate the a random set of suggested neutral baby names based on the given limitation and baby names in the past years.
find_unisex_name(bar=0.02,limit=10)Dependenciespython = "3.9"numpy = "1.24.1"pandas = "1.5.3"jellyfish = "0.9.0"pytest = "7.2.1"ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensenameformewas created by Daniel Cairns, Eyre Hong, Bruce Wu, Zilong Yi (UBC MDS). It is licensed under the terms of the MIT license.Creditsnameformewas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: namegender
Predict the gender of a name based on statistical data.InstallpipinstallnamegenderUsage>>>importnamegender>>>namegender.predict('Otto'){'name':'Otto','gender':'male','probability':99.68185288877577,'samples':31432}>>>namegender.predict_list(['Otto','Jane'])[{'gender':'male','samples':31432,'name':'Otto','probability':99.68185288877577},{'gender':'female','samples':370379,'name':'Jane','probability':99.69382713382778}]Sourceshttps://github.com/ropensci/genderdatahttps://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-data-by-state-and-district-of-https://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-level-datahttp://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/areas/nlp/corpora/names/0.htmlhttps://usa.ipums.org/usa/https://www.nappdata.org/napp/
Package: namegenerator
Name GeneratorGenerate Random Names for anythingScreenshotInspired byNoxan's GistNames Module by Trey HunnerInstall$ pip install namegeneratorUsageimportnamegeneratorprint(namegenerator.gen())#=> scaly-peach-centipedeGet HelpThere are few ways to get help:Pleasepost questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.For bug reports and feature requests, open issues.For direct and quick help, you canemail me.How to contributeHave an idea? Found a bug? Seehow to contribute.Thanks!LicenseMIT
Package: name-gen-tool
Username Generator 🧙‍♂️Generate unique and catchy usernames based on different styles and themes with theusername_generatorpackage.🚀 InstallationInstall the package using pip:pipinstallname_gen_tool🎯 FeaturesVariety of Styles:Choose from a wide range of styles like Professional, Nature-Inspired, Artistic, and more!Customizable Patterns:Combine nouns, adjectives, keywords, and numbers to create unique patterns.Prefix & Suffix Support:Add an additional touch with custom or random prefixes/suffixes.🎨 Available StylesProfessionalNature-InspiredArtisticAestheticFantasyCrazyCoolSportyCuteTech-InspiredSci-FiFunnyGamer...and more coming soon!Absolutely! Let's expand on the usage section, including examples for each of the options and their explanations:🔧 UsageTo generate usernames using the package, start by importing the necessary modules:fromusername_generatorimportgenerateUsernames,StylesBasic UsageSimply pass a keyword to generate usernames:usernames=generateUsernames('JohnDoe')print(usernames)Specify a StyleYou can specify a style from the available styles. For example, to generate nature-inspired usernames:styledUsernames=generateUsernames('JohnDoe',{'style':Styles.NATURE_INSPIRED})print(styledUsernames)Using Lucky NumbersAdd a favorite or lucky number that will be used in the generated usernames:luckyNumberUsernames=generateUsernames('JaneDoe',{'luckyNumber':7})print(luckyNumberUsernames)Adding Prefixes and SuffixesCustomize your usernames with prefixes and suffixes:prefixedUsernames=generateUsernames('Eva',{'prefix':'Queen'})print(prefixedUsernames)suffixedUsernames=generateUsernames('Eva',{'suffix':'TheGreat'})print(suffixedUsernames)You can also let the generator choose a random prefix for you:randomPrefixedUsernames=generateUsernames('Eva',{'prefix':True})print(randomPrefixedUsernames)Options Explainedstyle (optional):A string that specifies the style you want for the generated username. If not provided, a style will be randomly chosen.luckyNumber (optional):A number that will be used in the generated usernames. If not provided, a random number will be used.prefix (optional):A string that will be used as a prefix in the generated usernames. If set toTrue, a random prefix will be chosen. If not provided, no prefix will be used.suffix (optional):A string that will be used as a suffix in the generated usernames. If not provided, no suffix will be used.📜 LicenseThis project is licensed under the MIT License. See theLICENSEfile for more details.🌐 Official WebsitePlease visitUsernameGenerator.IOfor more advanced options and tools to make your username looks stunning.
Package: nameguard
NameGuard PythonThis repository contains the core logic for NameGuard, a python library, web API server, and AWS Lambda handler.Getting StartedEnv variablesAWS_ROLE-AWSRoleusedbyGitHubactionstocreatetheCloudFormationinfrastructurefordeployingNameGuardasanAWSLambdaandpushingthelatestbuildimagetoAWSECR.
SLACK_WEBHOOK_URL-SlackwebhookurlusedbyGitHubactionstosendnotificationsofdeploymentsuccessorfailuretothedevteam'sslackchannel.Installing the libraryNameGuard is available as a Python library onPyPI. You can install it withpip:pipinstallnameguardSetting Provider URIsNameGuard uses the specified Provider endpoint (e.g. Alchemy, Infura, your own Ethereum node, etc...) forsecure-primary-name/. Provider endpoints have to be set by environment variables, e.g.:exportPROVIDER_URI_MAINNET=https://eth-mainnet.g.alchemy.com/v2/[YOUR_ALCHEMY_API_KEY]exportPROVIDER_URI_GOERLI=https://eth-goerli.g.alchemy.com/v2/[YOUR_ALCHEMY_API_KEY]exportPROVIDER_URI_SEPOLIA=https://eth-sepolia.g.alchemy.com/v2/[YOUR_ALCHEMY_API_KEY]Starting the web serverA FastAPI application is included in thenameguard.web_apimodule. The default installation from PyPI does not include an ASGI server, so you will need to install one separately. For example, to installuvicorn:pipinstall'uvicorn[standard]'You can start the web server with:uvicornnameguard.web_api:appMake an example request:curl-d'{"name":"nick.eth", "network_name": "mainnet"}'-H"Content-Type: application/json"-XPOSThttp://localhost:8000/inspect-name# {#   "rating": "pass",#   "risk_count": 0,#   "highest_risk": null,#   "name": "nick.eth",#   "namehash": "0x05a67c0ee82964c4f7394cdd47fee7f4d9503a23c09c38341779ea012afe6e00",#   "normalization": "normalized",#   "checks": [...],#   "labels": [...],#   "canonical_name": "nick.eth",#   "title": "Looks Good",#   "subtitle": "All security checks passed!",#   "beautiful_name": "nick.eth"# }DevelopmentRunning testsBefore running nameguard tests, make sure you have installed the
required dependencies (along with dev dependencies).
They are installed by default using poetry:poetryinstallTo run nameguard tests locally, just run pytest from the root directory:pytest./api/tests/NameGuard also provides an option to run API tests (api/tests/test_api.py)
against a remote host (e.g. Lambda) where a NameGuard instance is running.
To enable this, you will need to set an environment variableLAMBDA_ROOT_URLto specify the remote host URL.This can be done like this:LAMBDA_ROOT_URL=https://api.nameguard.iopoetryrunpytestapi/tests/test_api.pyUsing the AWS Lambda handlerNameGuard includes a handler forAmazon AWS Lambda. It is available in thenameguard.lambdamodule. You can use it to create a Lambda function that will respond to HTTP requests. It uses themangumlibrary.Check out the includedDockerfilefor an example of how to build a Lambda container image.Disable monkeypatch testsBy default, the tests are using mock responses from external APIs. If you want to run tests using real requests to external APIs then setMONKEYPATCH=0.MONKEYPATCH=0poetryrunpytest
Package: nameko
[nah-meh-koh]A microservices framework for Python that lets service developers concentrate on application logic and encourages testability.A nameko service is just a class:# helloworld.pyfromnameko.rpcimportrpcclassGreetingService:name="greeting_service"@rpcdefhello(self,name):return"Hello,{}!".format(name)You can run it in a shell:$namekorunhelloworldstartingservices:greeting_service...And play with it from another:$ nameko shell>>>n.rpc.greeting_service.hello(name="ナメコ")'Hello, ナメコ!'FeaturesAMQP RPC and Events (pub-sub)HTTP GET, POST & websocketsCLI for easy and rapid developmentUtilities for unit and integration testingGetting StartedCheck out thedocumentation.SupportFor help, comments or questions, please go tohttps://discourse.nameko.io/.For enterpriseAvailable as part of the Tidelift Subscription.The maintainers of Nameko and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.Learn more.Security contact informationTo report a security vulnerability, please use theTidelift security contact. Tidelift will coordinate the fix and disclosure.ContributeFork the repositoryRaise an issue or make a feature requestLicenseApache 2.0. See LICENSE for details.
Package: nameko-apscheduler
Nameko ApschedulerANamekodependency provider for easy use withapscheduler.Quick StartInstall fromPyPI:pip install nameko-apscheduler# service.py

from nameko.rpc import rpc
from nameko_apscheduler import Scheduler

class Service:

    name = 'example'

    scheduler = Scheduler()Create a config file with essential settings:# config.yaml

AMQP_URI: 'pyamqp://guest:guest@localhost'
APSCHDULER:
    exchange_name: nameko-apscheduler
    jobstores:
        default:
            type: sqlalchemy
            url: mysql+mysqlconnector://${DB_USER:root}:${DB_PASS:}@${DB_SERVER:localhost}/${DB_NAME:crm}
    executors:
        default:
            type: threadpool
            max_workers: 20
    job_defaults:
        coalesce: False
        max_instances: 1
        misfire_grace_time: 1
    timezone: UTC
Package: nameko-cache
nameko-cacheCache for nameko servicesInstallationpip install nameko-cacheUsageapp.pyfromdatetimeimportdatetimefromnameko.rpcimportrpcfromnameko_redisyimportRedisfromnameko_cacheimportcached,delete_cachedclassFooService(object):name='foo_service'cache=Redis('CACHE_REDIS_URI')@rpc@cached(timeout=10)defhello(name):return'hello{}at{}'.format(name,datetime.now())@rpcdefworld(self):delete_cached(self.hello,['john'])config.ymlAMQP_URI: 'pyamqp://guest:guest@localhost'
CACHE_REDIS_URI: 'redis://127.0.0.1'
Package: nameko-cachelib
nameko-cacheAn easy-to-use nameko cacheSome code references from reponameko-cachetoolsInstallpipinstallnameko-cachelibExampleclassService:name="service"cached_service=CacheRpcProxy("service")@rpcdefcached(self,*args,**kwargs):returnself.cached_service.some_method(*args,**kwargs)TODO listmemory cachesingle flightredis cache
Package: nameko-cachetools
=============================Nameko Cache Tools=============================.. image:: https://badge.fury.io/py/nameko-cachetools.png:target: http://badge.fury.io/py/nameko-cachetools.. image:: https://travis-ci.org/santiycr/nameko-cachetools.png?branch=master:target: https://travis-ci.org/santiycr/nameko-cachetoolsA few tools to cache interactions between your nameko services, increasingresiliency and performance at the expense of consistency, when it makes sense.To use Nameko Cache Tools in a project::from nameko.rpc import rpcfrom nameko_cachetools import CachedRpcProxyclass Service(object):name = "demo"other_service = CachedRpcProxy('other_service')@rpcdef do_something(self, request):# this rpc response will be cached first, then use the different# cache strategies available in CachedRpcProxy or# CacheFirstRpcProxyother_service.do_something('hi')Caching strategies:-------------------CachedRpcProxy^^^^^^^^^^^^^^If a cached version of this request exists, a response from the cache issent instead of hangling forever or raising an exception.If a cached version doesn't exist, it will behave like a normal rpc,and wait indefinitey for a reply. All successful replies are cached.**WARNING**: Do NOT use this for setters, rpcs meant to modify state in thetarget serviceArguments:cachethe cache to use. This should resemble a dict but can be moresophisticated, like the caches provided by the cachetools package.failover_timeoutif a cached version of this query exists, how longin seconds should your original request wait until it deems the targetservice as unresponsive and moves on to use a cached responseCacheFirstRpcProxy^^^^^^^^^^^^^^^^^^Stores responses from the original services and keeps them cached.If further requests come in with the same arguments and found in the cache,a response from the cache is sent instead of hitting the destination service.**WARNING**: Do NOT use this for setters, rpcs meant to modify state in thetarget serviceArguments:cachethe cache to use. This should resemble a dict but can be moresophisticated, like the caches provided by the cachetools package.Documentation-------------The full documentation is at http://nameko-cachetools.rtfd.org.History-------0.1.0 (2018-06-10)++++++++++++++++++* First release on PyPI.
Package: nameko-cloudant
A Cloudant dependency fornameko, enabling services to interface with cloudant nosql database. Future improvements are CouchDB and local Cloudant.Usagefromnameko_cloudantimportDatabaseSessionclassService:session=Session("databasename")@event_handler("dispatcher","topic")defhandler(self,payload):self.session.create_document(payload)@rpcdefquery_db(self):selector={'name':{'$eq':'foo'}}docs=self.session.get_query_result(selector)fordocindocs:printdoc...To-DoWrite tests!Implement support for local bluemix instances.Implement support for CouchDB.
Package: nameko-cron
Nameko CronNamekoCronentrypoint fires based on a cron expression. It is not cluster-aware and
will fire on all service instances. The cron schedule is based oncroniter.Usagefromnameko_cronimportcronclassService:name="service"@cron('*/5 * * * *')defping(self):# executes every 5 minutesprint("pong")timezone-aware cron schedules are also availablefromnameko_cronimportcronclassService:name="service"@cron('0 12 * * *',tz='America/Chicago')defping(self):# executes every day at noon America/Chicago timeprint("pong")by default, if a worker takes longer than the next scheduled run the worker will wait until
the task is complete before immediately launching a new worker. This behavior can be controlled
via theconcurrencykeyword argument.ConcurrencyPolicy.WAITis that default behavior.ConcurrencyPolicy.ALLOWwill spawn a worker regardless of whether existing workers are still running.ConcurrencyPolicy.SKIPwill skip a run if the previous worker lapsed the next scheduled run.
Package: nameko-design
nameko-designGenerateNamekohttp files from design schema inspired bygoaDependenciesPython3.6PoetryInstallationcdnameko-design
poetryinstallUsagecdnameko-design
poetryrunnameko-designnameko_design/sample.pyDesignThis API design schemawithService('http_service'):Title('This is a http service')withMethod('liveness'):Description('liveness probe')Result(str)HTTP(GET,'/liveness')withMethod('readiness'):Description('readiness probe')Result(str)HTTP(GET,'/readiness')will generate the below nameko filefromnameko.web.handlersimporthttpclassHttpService:name='http service'@http('GET','/liveness')defliveness(self,request)->str:pass@http('GET','/readiness')defreadiness(self,request)->str:passTODOConfigure http url and portAdd URL parameter and typeAdd payload (name, type, description, position etc)Add validationAdd gRPC serverGenerate proto filesGenerate swagger jsonWhat I want:withService('example_service'):Title('This is an example service')withMethod('liveness'):Description('liveness probe')Result(str)HTTP(GET,'/liveness')withMethod('add'):Description('a + b')withPayload():# Not yet implementedField(1,"a",int,"left operand")# Not yet implementedField(2,"b",int,"right operand")# Not yet implementedRequired("a","b")# Not yet implementedResult(int)HTTP(GET,'/add/{a}/{b}')# Not yet implementedGRPC()# Not yet implemented
Package: nameko-django
django-namekoTravis-CIBranchBuild statusmasterdevelopnameko-djangoDjango intergration for nameko microservice frameworkCustom Kombu Serializer for django Object using msgpack and pickleThis serializer is fully compatible with msgpack so it can be used like this:serializer:'django_msgpackpickle'ACCEPT:['msgpack','django_msgpackpickle']SERIALIZERS:msgpack:encoder:'nameko_django.serializer.dumps'decoder:'nameko_django.serializer.loads'content_type:'application/x-msgpack'content_encoding:'binary'In order to migrate an existing microservices stack (that usemsgpackserializer) to use this new serializer
first install and setup all projectserializer:'msgpack'ACCEPT:['msgpack','django_msgpackpickle']SERIALIZERS:msgpack:encoder:'nameko_django.serializer.pack'decoder:'nameko_django.serializer.loads'content_type:'application/x-msgpack'content_encoding:'binary'This will accept both of themsgpackanddjango_msgpackpicklebut only output of result portfolio usingmsgpackOnce all service migrated, then switch to the first configurationFeaturesThis serializer will automatically encode and decode:DateTime, Date, Time, Duration:
object will be converted to string representation compatible with django.utils.dateparse
and convert back using django.utils.dateparse()Decimal:
object will be converted to byte string and then recover back to DecimalDjango ORM instance:
object will be pickled using python cPickle/pickle library and depickled back to ORM Model instanceDjango ORM queryset:
object will be deform to Model + Query then pickled to avoid sending a list of instanceString evaluationThis serializer can evaluate string that is compatible withdjango.utils.dateparseformat
and auto convert the string to eitherDateTime,Date,Time,Durationobject.Also it can evaluate string with format like this:"<app_name.model_name.ID>"this will be converted to an ORM instance: usingModel.objects.get(pk=ID)For example:<auth.User.1>"(app_name.model_name: RAW_QUERY_WITHOUT_SELECT_FROM)"this will be converted to an ORM queryset
For example:(auth.User: id >= 1 and date_joined > '2018-11-22 00:47:14.263837')
Package: nameko-django-orm
This package setup the django framework to take advantage of the ORM features and some other django features.You need to specify the DJANGO_SETTINGS_MODULE environment variable, if not, ‘settings’ is used by default.Inject the dependency into the nameko service with the DjangoModels dependency.Supposing you injected the DjangoModels dependency into themodelsvariable, you can use from your procedures likeself.models.MyModel.objects.all().