Saravanan666/pypi-org huggingface dataset:
Package: ntgen
ntgen - named tuple generatorGenerate NamedTuple definitions with typehints based on your data automatically.
If you've ever felt like preparing NamedTuple skeletons for any json data you're dealing with is tedious and could be
automated, well, this is the tool that automates the process.UsageLet's say you want to prepare a NamedTuple definition for the following json object:$catapartment.json{"id":"1234-1234","type":"living","isAvailable":true,"countryCode":"DE","address":{"borough":"Dulsberg","city":"Hamburg","houseNumber":"2","latitude":53.587485,"longitude":10.063215,"postalCode":"22049","streetName":"Nordschleswiger Strasse","area":"Hamburg"},"_attachments":"attachments/","_ts":15828103462}%All you need to do is run the following command:$ntgenapartment.json
classAddress(NamedTuple):borough:strcity:strhouse_number:strlatitude:floatlongitude:floatpostal_code:strstreet_name:strarea:str


classApartment(NamedTuple):id:strtype:stris_available:boolcountry_code:straddress:Addressattachments:strts:intThe output will be directed to stdout by default - you may also redirect it to a file to bootstrap a Python module with
the class definitions.Runtime configurationTo find out about all of the runtime configuration options, run:$ntgen--help
usage:ntgen[--outOUT][--nameNAME][-s][-c][-f][-t][--max_levelMAX_LEVEL][-h]input

positionalarguments:input(str,default=None)Jsonfilecontaininganobjectwiththedatatoanalyzed

optionalarguments:--outOUT(Union[str,NoneType],default=None)DestinationfiletowritethePythoncodeto--nameNAME(str,default=NTGenTuple)NameofthemainNamedTuple-s,--snake-case(bool,default=True)ConverttheNamedTuplefieldnamestosnake_case-c,--camel-case(bool,default=True)ConverttheNamedTupleclassnamestoCamelCase-f,--constructors(bool,default=False)Insertgenericmethodsthatwillallowforparsingoftheanalyzeddatastructures-t,--as-dict(bool,default=False)InsertgenericmethodsallowingfordumpingthenestedNamedTuplehierarchytoadict--max_levelMAX_LEVEL(Union[int,NoneType],default=None)SpecifythemaxnestingleveloftheNamedTuple-h,--helpshowthishelpmessageandexitOther invocation optionsYou can also use the library from the Python context:>>>fromntgenimportgenerate_from_dict>>>data={'name':'John Wick','profession':'assassin','age':34}>>>print(generate_from_dict(data=data,name="Character"))classCharacter(NamedTuple):name:strprofession:strage:intInstallationYou'll need to be running Python >= 3.7.pipinstallntgenVerify that the latest package version was installed correctly:>>>importntgen>>>ntgen.__version__'0.3.0'LicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAuthorMaciej Rapacz
Package: nthBday
========== nthBday ==========nthBdayis a an open-source python package to find business/working days of a month.Please Note: The holidays taken here are Indian holidays. In the next versions our countries holidays will be added too.InstallationnthBday requiresPython 3andpandasto execute.To install using pip, usepip install nthBdayFeaturesnthBday package contains different functions such as:first_working_day: Returns the first working day of a monthsecond_working_day: Returns the second working day of a monththird_working_day: Returns the third working day of a monthfourth_working_day: Returns the fourth working day of a monthfifth_working_day: Returns the fifth working day of a monthnth_working_day: Returns the n-th working day of a monthlast_working_day: Returns the last working day of a monthnth_last_working_day: Returns the n-th last working day of a monthlast_sun: Returns the last sunday of a monthlast_sat: Returns the last saturday of a monthlast_fri: Returns the last friday of a monthlast_thu: Returns the last thursday of a monthlast_wed: Returns the last wednesday of a monthlast_tue: Returns the last tuesday of a monthlast_mon: Returns the last monday of a monthsecond_sat: Returns the second saturday of a monthfourth_sat: Returns the fourth saturday of a monthUsageImport the library:importnthBdayasnbExamplesimportnthBdayasnbnb.first_working_day(2,2023)returns,datetime.date(2023,2,1)importnthBdayasnbnb.nth_working_day(2,2023,17)returns,datetime.date(2023,2,23)importnthBdayasnbnb.last_working_day(2,2023)returns,datetime.date(2023,2,28)importnthBdayasnbnb.nth_last_working_day(2,2023,17)returns,datetime.date(2023,2,6)importnthBdayasnbnb.last_thu(3,2023)returns,datetime.date(2023,3,30)importnthBdayasnbnb.second_sat(3,2023)returns,datetime.date(2023,3,11)LicenseMIT
Package: nthp-api
History Project API GeneratorThis project generates a JSON API from thehistory-projectcontent repository. It does that in two steps:load: Generate a sqlite database from the source files.dump: Use that database to generate a JSON API.EndpointsThe API is currently hosted athttps://nthp-api.wjdp.uk/v1.The specification is available athttps://nthp-api.wjdp.uk/v1/master/openapi.json.To render the spec into human-readable docs use a tool such as:ReDochttps://redocly.github.io/redoc/?url=https://nthp-api.wjdp.uk/v1/master/openapi.json.Stoplighthttps://elements-demo.stoplight.io/?spec=https://nthp-api.wjdp.uk/v1/master/openapi.jsonUsageFrom sourceEnsure you havePoetryinstalled.Runpoetry install.Clone the history project repository into thecontent/directory. You can do a shallow clone for this:GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 --branch master git@github.com:newtheatre/history-project content.Run./nthp loadto generate the sqlite database from the content files.Run./nthp dumpto generate the API from the database into thedist/directory.From PyPiWith pip installed runpip install --user nthp-api. If you have your local bin folder on your path you should now be able to runnthp.Within the history-project repo runnthp loadto generate the sqlite database from the content files.Runnthp dumpto generate the API from the database into thedist/directory.Alternatively you can runnthp buildto run both steps in one go.Contributingpre-commit hookspre-commit hooks are used to lint the source code usingBlackandruffEnsure you havepre-commitinstalled.Runpre-commit installto install pre-commit hooks.TestsRunpytestor use the included PyCharm run configuration.ReleaseSee thebin/release.shscript for the release process. This assumes that your local machine has the correct credentials to publish to PyPi.
Package: ntia-conformance-checker
NTIA Conformance CheckerThis tool determines whether aSPDXsoftware bill of materials (SBOM) document contains the National Telecommunications and Information Administration (NTIA)"minimum elements."The mapping of the NTIA elements required data fields to the SPDX specification can be foundhere.The minimum elements include:Supplier NameComponent NameVersion of the ComponentOther Unique IdentifiersDependency RelationshipAuthor of SBOM DataTimestampAs defined by the NTIA, the minimum elements are "the essential pieces that support basic SBOM functionality and will serve as the foundation for an evolving approach to software transparency."InstallationTo install use the following command:pip install ntia-conformance-checkerAlternatively, just clone the repo and install dependencies using the following commands:gitclonehttps://github.com/spdx/ntia-conformance-checker.git
pipinstall.The tool requires Python 3 (3.8+). It is recommended to use a virtual python environment especially
if you are using different versions of python.virtualenvis a tool for setting up virtual python environments which
allows you to have all the dependencies for the tool set up in a single environment, or have different environments set
up for testing using different versions of Python.CLI UsageUsage: ntia-checker [OPTIONS]

Options:
  --file TEXT            The file to be parsed
  --output [print|json]  Output format  [default: print]
  -v, --verbose          Use verbose printing
  --output_path TEXT     Filepath for optionally storing output.
  -h, --help             Show this message and exit.The user can then analyze a particular file:ntia-checker--filesbom.jsonTo generare the output in machine-readable JSON, run:ntia-checker--filesbom.spdx--outputjsonUsage as a Libraryntia-conformance-checkercan also be imported as a library. For example:importntia_conformance_checkerasntiasbom=ntia.SbomChecker("SBOM_filepath")print(sbom.ntia_mininum_elements_compliant)Additional properties and methods associated withSbomChecker()can be found insbom_checker.py.HistoryThis is the result of an initialGoogle Summer of Code (GSoC)contribution in 2022 by@linynjoshand is maintained
by a community of SPDX adopters and enthusiasts.LicenseApache-2.0Dependenciesspdx-toolsused for parsing the SPDX SBOM.SupportSubmit issues, questions or feedback athttps://github.com/spdx/ntia-conformance-checker/issuesJoin the discussion onhttps://lists.spdx.org/g/spdx-techandhttps://spdx.dev/participate/tech/ContributingContributions are very welcome! SeeCONTRIBUTING.mdfor instructions on how to contribute to the codebase.Further helpCheck out thefrequently asked questionsdocument.
Package: nti.app.pyramid-zope
nti.app.pyramid_zopeThis library provides a set of components (often in thezope.interfaceandzope.componentmeanings) to integrate Zope3
technologies into a modern Pyramid application.Changes0.0.3 (2021-08-11)Requirezope.principalregistryand configure it fromconfigure.zcml. This packge needs the unauthenticated principal
utility it provides.Requirezope.publisherand configure it fromconfigure.zcml.
This is needed for language negotiation based on requests.Add support for I18N.Add support for Python 3.9. 3.10 is expected to work once zodbpickle
is released with support for 3.10.0.0.2 (2020-01-02)Addnti.app.pyramid_zope.traversal.ZopeResourceTreeTraverser, a
PyramidITraverserthat uses thezope.traversingmachinery,
including path adapters and namespaces.Makeconfigure.zcmlregister the standard traversing adapters
which accept a PyramidIRequestobject. This goes hand-in-hand
with using theZopeResourceTreeTraverser. These are the same
namespaces that would be registered byzope.traversingfor the
Zope request (with the exception of theattributenamespace).0.0.1 (2020-01-01)Initial release.
Package: ntier-aiohttp
Connector for N-Tier to aiohttpN-Tier is a framework agnostic library for building out N-Tier web applications. This module
defines methods for adapting N-Tier to the aiohttp web framework.Please note: documentation on this project is currently not providedInteracting With the Projectmakeis the best way to interact with the project.Setting Up:make installRunning Tests:make testRunning Coveragemake coverage
Package: nti.fakestatsd
nti.fakestatsdWarningThis project is deprecated and unmaintained. Its code has moved
intoperfmetrics.testing.The following is for historical information only.nti.fakestatsd is a testing client for verifying StatsD metrics
emitted by perfmetrics.It’s easy to create a new client for use in testing:>>>fromnti.fakestatsdimportFakeStatsDClient>>>test_client=FakeStatsDClient()This client exposes the same public interface asperfmetrics.statsd.StatsdClient. For example we can increment
counters, set gauges, etc:>>>test_client.incr('request_c')>>>test_client.gauge('active_sessions',320)Unlikeperfmetrics.statsd.StatsdClient,~.FakeStatsDClientsimply
tracks the statsd packets that would be sent. This information is
exposed on ourtest_clientboth as the raw statsd packet, and for
convenience this information is also parsed and exposed as~.Metricobjects. For complete details see~.FakeStatsDClientand~.Metric.>>>test_client.packets['request_c:1|c', 'active_sessions:320|g']>>>test_client.metrics[Observation(name='request_c', value='1', kind='c', sampling_rate=None), Observation(name='active_sessions', value='320', kind='g', sampling_rate=None)]For validating metrics we provide a set of hamcrest matchers for use
in test assertions:>>>fromhamcrestimportassert_that>>>fromhamcrestimportcontains>>>fromnti.fakestatsd.matchersimportis_metric>>>fromnti.fakestatsd.matchersimportis_gaugeWe can use both strings and numbers (or any matcher) for the value:>>> assert_that(test_client,
...     contains(is_metric('c', 'request_c', '1'),
...              is_gauge('active_sessions', 320)))
>>> assert_that(test_client,
...     contains(is_metric('c', 'request_c', '1'),
...              is_gauge('active_sessions', '320')))
>>> from hamcrest import is_
>>> assert_that(test_client,
...     contains(is_metric('c', 'request_c', '1'),
...              is_gauge('active_sessions', is_('320'))))If the matching fails, we get a descriptive error:>>> assert_that(test_client,
...     contains(is_gauge('request_c', '1'),
...              is_gauge('active_sessions', '320')))
Traceback (most recent call last):
...
AssertionError:
Expected: a sequence containing [(an instance of Metric and (an object with a property 'kind' matching 'g' and an object with a property 'name' matching 'request_c' and an object with a property 'value' matching '1')), (an instance of Metric and (an object with a property 'kind' matching 'g' and an object with a property 'name' matching 'active_sessions' and an object with a property 'value' matching '320'))]
       but: item 0: was Metric(name='request_c', value='1', kind='c', sampling_rate=None)For complete details and the changelog, see thedocumentation.Changes1.0.0 (2019-09-03)This project has been merged intoperfmetrics.testing. There
will be no further development.0.0.2 (2018-10-26)Metric kindsis now handled as a distinct type. Seeissue 6.Metric values are now always native strings. Seeissue 2.Restructure and document public objects. Seeissue 1.Add convenience hamcrest matchers. Seeissue 1.0.0.1 (2018-10-12)First PyPI release.
Package: nti.intid
nti.intidExtensions for Zope3’s intid concept.Seezope.intidandzc.intidfor information on the basics.Changes0.0.2 (2020-06-19)Refactor tests to usenti.site.testingfor DB and site management.0.0.1 (2020-06-19)First PyPI release.The weak ref classes no longer have dictionaries for arbitrary
attributes. They never persisted arbitrary attributes.
Package: nti.mailer
nti.mailerChanges0.0.1a2 (2021-09-07)Translate thesubjectargument given to the defaultITemplatedMailerimplementation. Seeissue 18.Deprecate themessage_factoryargument toITemplatedMailer.queue_simple_html_text_email. If you use this
argument, please bring up your use-case in the issue tracker.Reach 100% test coverage.0.0.1a1 (2021-08-12)Initial PyPI release.Add support for Python 3.6 through 3.9. 3.10 is expected when
zodbpickle supports it.
Package: nti.ntiids
nti.ntiidsThis package provides support for semantic URIs for objects using thetag URI scheme.
These tag URIs are used to look up objects in an application, usually
independent of their traversal path. These URIs, structured in a
particular way, are called NTIIDs. When represented as strings, they
use the Python text (unicode) type.In thespecificpart of the URI, each NTIID includes a type. A
type is essentially a namespace in which the rest of the specific part
is to be interpreted. A set of known types are defined innti.ntiids.ntiids, as are functions to parse and generate NTIIDs.The set of types is extensible throughzope.componentregistrations for important interfaces likenti.ntiids.interfaces.INTIIDResolver, which is registered by name
for specific types of NTIIDs. No resolvers are provided by this package.The packagenti.ntiids.oidsintegrates withnti.externalizationand serves as the hook used for external
identifiers. These are derived from persistent ZODB object identifiers
(“oid”) with support for multiple databases (a multi-ZODB).Changes0.0.1 (2020-06-18)First public PyPI release.Add support for Python 3.
Package: nti.plasTeX
NoteThis README, while providing a basic introduction, is probably
outdated in many important ways in the context of this fork.Installation of this package is done just like any other modern Python
package. See the INSTALL file for details.Once you have plasTeX installed, you can use the command-line utility,
called “plastex” just like latex or pdflatex.  For example, if you
have a LaTeX file called mybook.tex, simply run:plastex mybook.texThis will convert mybook.tex into XHTML (the default renderer).  Of course,
there are many options to control the execution of plastex.  Simply type
“plastex” on the command line without options or arguments to see the
full list of command-line options.It is also possible to write your own command-line utilities that leverage
the power of the plasTeX framework.  In fact, the essence of the “plastex”
command can be written in just one line of code (not including the Python
import commands):import sys
from plasTeX.TeX import TeX
from plasTeX.Renderers.XHTML import Renderer
Renderer().render(TeX(file=sys.argv[1]).parse())plasTeX is really much more than just a LaTeX-to-other-format converter
though.  See the documentation athttp://plastex.sf.net/for a complete
view of what it is capable of.
Package: nti.property
nti.propertynti.property offers a set of classes and utility functions to set
properties on objects or classes.Complete documentation can be found athttp://ntiproperty.readthedocs.ioChanges2.0.1 (2024-02-16)Updates to documentation and logging for tunables.2.0.0 (2024-01-29)Add support for Python 3.12.Drop runtime dependency on setuptools in favor of “native namespace
packages”.Drop support for legacy Python versions: 2.7, 3.6. 3.7, 3.8 and 3.9.Add new modulenti.property.tunablesfor customizing parameters
(usually represented as class variables) from the environment.1.2.0 (2023-05-05)Add support for Python 3.8, 3.9, 3.10 and 3.11.1.1.0 (2018-09-13)Add support for Python 3.7.Add support for zope.schema 4.7.1.0.0 (2017-04-26)First PyPI release.Add support for Python 3.6.Remove backward compatibility exports.
Package: nti.recipes.json
nti.recipes.jsonThis is azc.buildoutrecipe that programatically creates JSON filesLets look at an example using a buildout part:[nodeserver-env]
recipe = nti.recipes.json
output-file = /home/user/etc/nodeserver-env.json
contents-section = nodeserver-env-root

[nodeserver-env-root]
stripe-section = nodeserver-stripe
jquery-payment-section = nodeserver-jquery.payment

[nodeserver-jquery.payment]
requires =
  jquery
  stripe
  **end-list**
url = https://my.server.com/libs/jquery.payment/1.3.2/jquery.payment.min.js
definesSymbol = jQuery.payment

[nodeserver-stripe]
url = https://js.stripe.com/v2/
definesSymbol = StripeThe output for /home/user/etc/nodeserver-env.json will be:{
    "jquery-payment": {
                "definesSymbol": "jQuery.payment",
                "requires": [
                        "jquery",
                        "stripe"
                ],
                "url": "https://my.server.com/libs/jquery.payment/1.3.2/jquery.payment.min.js"
        },
        "stripe": {
                "definesSymbol": "Stripe",
                "url": "https://js.stripe.com/v2/"
        }
}Changes1.0.0 (2018-02-19)First PyPI release.
Package: nti-sphinx-questions
nti_sphinx_questionsA sphinx extension providing two directives intended to be useful
during early phases of a project (e.g., requirement gathering):.. question::is a note-like environment to write an unresolved
question... questionlist::produces a hyperlinked collection of all such
questions found in the Sphinx document set.CHANGES0.0.1 (2020-06-16)Initial PyPI release.
Package: nti.wsgi.cors
nti.wgi.corsA WSGI middleware for handling CORS.Changes1.2.0 (2023-05-05)Add support for Python 3.10 and 3.11.1.1.1 (2021-04-20)Greenlet dependency is only required on CPython. SeeIssue 21.1.0 (2021-04-20)Add support for python 3.7, 3.8 and 3.9.1.0.0 (2017-04-20)First PyPI release.Add support for Python 3.
Package: nti.zodb
nti.zodbUtilities for working with ZODB.Complete documents are found athttp://ntizodb.readthedocs.io/Changes1.3.0 (2021-04-01)Add support for Python 3.9.The ZODB activity log monitor now has separate thresholds for loads
and stores, in addition to the total combined threshold; exceeding
any threshold will trigger logging.The thresholds have all been set to 10, but can be configured with
environment variables.Seeissue 11.1.2.0 (2020-08-06)Add a BTree “family” object tonti.zodb.btreesthat uses larger
bucket sizes. Seeissue 8.All numeric minmax objects implement the same interface, providing
theincrementmethod. Seeissue 7.The merging counter does the right thing when reset to zero by two
conflicting transactions. Seeissue 6.1.1.0 (2020-07-15)Add support for Python 3.7 and 3.8.Loading this package’s configuration no longer markspersistent.list.PersistentListas implementing the deprecated
interfacezope.interface.common.sequence.ISequence. This
conflicts with a strict resolution order. Preferzope.interface.common.collections.ISequenceor its mutable
descendent, whichPersistentListalready implements.Reworknti.zodb.activitylogto be faster. Client code may need
to adapt for best efficiency.The monitors innti.zodb.activitylognow include information
about the ZODB connection pool. Seeissue 4.The log monitor now has a configurable threshold, defaulting to at
least one load or store. Seeissue 3.1.0.0 (2017-06-08)First PyPI release.Add support for Python 3.Remove nti.zodb.common. Seehttps://github.com/NextThought/nti.zodb/issues/1.ZlibClientStorageURIResolverwill no longer try to set avardirectory to store persistent cache files automatically.CopyingWeakRefnow implementsICachingWeakRef.
Package: nti.zope-catalog
nti.zope_catalogUtilities and extensions for ZODB-based Zope catalogs and indexes.This builds on both zope.catalog and zc.catalog.Changes3.0.1 (2021-05-13)Fix theExtentFilteredSetto only unindex documents that were
previously indexed. This avoids an extrareadCurrentcall. Seeissue 12.3.0.0 (2021-05-12)Add support for Python 3.7, 3.8 and 3.9.Note thatzopyx.txng3.extversion 4.0.0, the current version at
this writing, may or may not build on CPython 3, depending on how
your compiler and compiler options treat undefined functions.
Seethis issue.Also note that both PyPy 3.6 and 3.7 (7.3.4) are known to crash when
running the test suite. PyPy2 7.3.4 runs the test suite fine.When updating indexes in a catalog, first check if the type of each
object to be visited implementsINoAutoIndex. If it does, we can
avoid prematurely activating persistent ghost objects. Seeissue 8.Require ZODB 5 in order to use the newprefetch()method.When adding or updating an index in a catalog, use ZODB’s prefetch
method to grab chunks of object state data from the database. This
can be substantially faster than making requests one at a time. This
introduces a new classCatalogPrefetchIteratorthat may be
useful in other circumstances. Seeissue 7.2.0.0 (2017-11-05)RenameTimestampToNormalized64BitIntNormalizertoTimestampTo64BitIntNormalizerfor consistency.MakeTimestampTo64BitIntNormalizersubclassTimestampNormalizerfor simplicity.RenameFloatToNormalized64BitIntNormalizertoPersistentFloatTo64BitIntNormalizerfor consistency and to
reflect its purpose.MakePersistentFloatTo64BitIntNormalizersubclassFloatTo64BitIntNormalizer.AddIDeferredCatalogand an implementation inDeferredCatalogto allow creating catalog objects that don’t
participate in event subscription-based indexing. This replacesIMetadataIndex, which is now an alias for this object. Seeissue 3.1.0.0 (2017-06-15)First PyPI release.Add support for Python 3.TimestampNormalizeralso normalizes incoming datetime objects.Fix extent-based queries for NormalizedKeywordIndex.100% test coverage.