Saravanan666/pypi-org huggingface dataset:
Package: elastic-log-cli
Elastic Log CLICLI for streaming logs from Elasticsearch to a terminal.InstallationInstall withpip:pipinstallelastic-log-cli:memo: Requires Python 3.10ConfigurationThe following environment variables are used to configure the tool. For secure, easy selection of target clusters, a tool likeenvchainis recommended.Where available, CLI options will override environment variables.ELASTICSEARCH_URLRequiredURL of the Elasticsearch cluster containing logs. You can also provide an Elastic Cloud ID by prefixing with itcloud:.ELASTICSEARCH_USERNAMEOptionalUsername for the Elasticsearch cluster containing logs.ELASTICSEARCH_PASSWORDOptionalPassword for the Elasticsearch cluster containing logs.ELASTICSEARCH_AUTH_MODEOptional, default value:basicauthSpecify which authentication mode you are using.The default behaviour isbasicauth, which encodes the username and password using HTTP Basic Auth.You may also set this toapikey, in which case the API Keys should be provided as follows:ELASTICSEARCH_USERNAME=${APIKEY_NAME}
ELASTICSEARCH_PASSWORD=${APIKEY_KEY}Finally, if you are usingAmazon OpenSearch ServicewithAWS Signature V4auth, then set this toawssigv4. AWS credentials will be read from the environment and used to sign your requests.Possible valuesbasicauth,apikey,awssigv4ELASTICSEARCH_TIMEOUTOptional, default value:40How long to wait on Elasticsearch requests.ELASTICSEARCH_INDEXOptional, default value:filebeat-*The index to target. Globs are supported.ELASTICSEARCH_TIMESTAMP_FIELDOptional, default value:@timestampThe field which denotes the timestamp in the indexed logs.UsageUsage: elastic-logs [OPTIONS] QUERY

  Stream logs from Elasticsearch.

  Accepts a KQL query as its only positional argument.

Options:
  -p, --page-size INTEGER RANGE  The number of logs to fetch per page  [x>=0]
  -i, --index TEXT               The index to target. Globs are supported.
                                 [default: (filebeat-*)]
  -s, --start TEXT               When to begin streaming logs from.
  -e, --end TEXT                 When to stop streaming logs. Omit to
                                 continuously stream logs until interrupted.
  --source CSV                   Source fields to retrieve, comma-separated.
                                 Default behaviour is to fetch full document.
  -t, --timestamp-field TEXT     The field which denotes the timestamp in the
                                 indexed logs.  [default: (@timestamp)]
  --version                      Show version and exit.
  --help                         Show this message and exit.Exampleelastic-logs\--start2022-03-05T12:00:00\--end2022-03-05T13:00:00\--sourcetime,level,message,error\--indexfilebeat-7.16.2\--timestamp-fieldtime\'level:ERROR and error.code:500'KQL supportThe following KQL features are not yet supported:Wildcard fields, e.g.*:valueormachine.os*:windows 10Prefix matching, e.g.machine.os:win*Match phrase, e.g.message:"A quick brown fox"DevelopmentInstall dependencies:pyenvshell3.10.x
pre-commitinstall# Configure commit hookspoetryinstall# Install Python dependenciesRun tests:poetryruninvverifyLicenseThis project is distributed under the MIT license.
Package: elasticluster
Elasticlusteraims to provide a user-friendly command line tool to
create, manage and setup computing clusters hosted on cloud
infrastructures (likeAmazon’s Elastic Compute Cloud EC2orGoogle
Compute Engine)
or a privateOpenStackcloud). Its main goal
is to get your own private cluster up and running with just a few commands; aYouTube videodemoes the basic features of elasticluster.This project is an effort of theGrid Computing Competence Centerat theUniversity of Zurich, licensed under theGNU General Public License version 3.Documentation for elasticluster is available on theRead The DocswebsiteFeaturesElasticlusteris in active development, but offers the following features at the current state:Simple configuration file to define cluster templatesCan start and manage multiple independent clusters at the same timeAutomated cluster setup:useDebian GNU/Linux,Ubuntu, orCentOSas a base operating systemchooseSLURM,Grid EngineorTORQUE+MAUIas a batch-queueing systemsetup yourHadoopcluster to start your favorite map/reduce jobor create yourIPython clusterto run your python code in
parallel over multiple virtual machinesconfigure a distributed storage likeGlusterFSorCeph, or a
parallel filesystem likeOrangeFS(formerly known as PVFS2)add useful tools likeGangliafor monitoring……or anything that you can install with anAnsibleplaybook!Grow and shrink a running clusterElasticlusteris currently in active development: please use the
GitHub issue tracker tofile enhancement requests and ideasWe appreciate pull requests for new features and enhancements. Please
use the master branch as starting point.QuickstartInstalling from PyPIElasticlusteris aPythonprogram; Python
version 2.6 is required to run it.It’s quite easy to installelasticlusterusingpip; the command below is all you
need to installelasticlusteron your system:pip install elasticlusterIf you want to runelasticlusterfrom source you have toinstallAnsiblefirst:pip install ansible
python setup.py installInstalling the development version from githubThe source code of elasticluster isgithub, if you want to test the
latest development version you can clone thegithub elasticluster repository.You need thegitcommand in order to be able to clone it, and we
suggest you to usepython virtualenvin order to create a
controlled environment in which you can install elasticluster as
normal user.Assuming you already havevirtualenvinstalled on your machine,
you first need to create a virtualenv and installansible, which is
needed by elasticluster:virtualenv elasticluster
. elasticluster/bin/activate
pip install ansibleThen you have to download the software. We suggest you to download itwithinthe created virtualenv:cd elasticluster
git clone git://github.com/gc3-uzh-ch/elasticluster.git src
cd src
python setup.py installNow theelasticlustershould be available in your current
environment.
Package: elasticmapper
ElasticMapperElasticSearch mapper for three ORMs - SQLAlchemy, Peewee, DjangoORM.Allows you to easily generate ElasticSearch mappings based on models.Installationpip install elasticmapperBasic usagePeewee examplefrompeeweeimport*fromelasticmapperimportPeeweeMapperdb=SqliteDatabase('my_app.db')classBaseModel(Model):classMeta:database=dbclassUser(BaseModel):username=CharField(unique=True)is_active=BooleanField(default=True)age=IntegerField()user_elastic_mapping=PeeweeMapper(model=User).load()SQLAlchemy examplefromsqlalchemy.ormimportdeclarative_basefromsqlalchemyimportColumn,Integer,String,BooleanfromelasticmapperimportSQLAlchemyMapperBase=declarative_base()classUser(Base):__tablename__='users'id=Column(Integer,primary_key=True)username=Column(String)is_active=Column(Boolean)age=Column(Integer)user_elastic_mapping=SQLAlchemyMapper(model=User).load()DjangoORM examplefromdjango.dbimportmodelsfromelasticmapperimportDjangoMapperclassUser(models.Model):username=models.CharField(max_length=30)is_active=models.BooleanField(default=True)age=models.IntegerField()user_elastic_mapping=DjangoMapper(model=User).load()Output for all examples:{'id':{'type':'integer'},'username':{'type':'text'},'age':{'type':'integer'},'is_active':{'type':'boolean'}}DocumentationDocumentation liveshere.ContributingPR are welcome! If you want to help, please checkthe issuesand fix one of them. Thank you for your contribution.LicenseCopyright © 2022 Polina BeskorovaynayaihatemilkThis project hasMIT License.
Package: elasticmodels
# ElasticmodelsElasticmodels helps you index and query your Django models using elasticsearch.It is designed to be an alternative to django-haystack when you need more control overyour index creation, and you are always going to use elasticsearch.# Installpip install elasticmodels# Setup## settings.pyIn your Django settings file, define these variables:```pythonELASTIC_SEARCH_CONNECTION = {"urls": ["http://localhost:9200/"],"index": "the_name_of_your_es_index",# "http_auth": "username:password",}# these are used when your index is createdELASTIC_SEARCH_SETTINGS = {"settings": {"analysis": {"analyzer": {"snowball": {"type": "snowball","stopwords": "_none_"}}}}}```Add elasticmodels to INSTALLED_APPS:```pythonINSTALLED_APPS = (...'elasticmodels',)```## app/search_indexes.pyIn a Django app, create a search_indexes.py file, like so:```pythonfrom elasticmodels import Indexablefrom django.template.loader import render_to_stringfrom .models import File, FileTagclass FileIndex(Indexable):# specify the model class this index is formodel = Filedef mapping(self):"""Return the elasticsearch mapping for this model type"""return {"properties": {"pk": {"type": "integer", "index": "not_analyzed"},"content": {"type": "string", "analyzer": "snowball"},"tags": {"type": "string", "analyzer": "keyword"},"org_id": {"type": "integer", "index": "not_analyzed"},"type": {"type": "integer", "analyzer": "keyword"},"uploaded_by_id": {"type": "integer", "analyzer": "keyword"},}}def prepare(self, obj):"""Return obj transformed into a dict that corresponds to the mappingyou defined. This is what will be indexed by elasticsearch."""return {"pk": obj.pk,"content": render_to_string("files/search.txt", {"object": obj}),"tags": [ft.tag.name for ft in FileTag.objects.filter(file=obj).select_related("tag")],"org_id": obj.org_id,"type": obj.type,"uploaded_by_id": obj.uploaded_by_id,}```# Usage## Deleting and recreating your index./manage.py rebuild_index**This will delete the entire elasticsearch index** and recreate it. All yourmodel objects will be re-indexed.## Adding an individual object to the index```pythonfrom elasticmodels import make_searchablef = File(name="Foo", type=1)f.save()make_searchable(f)```## QueryingYour subclass of elasticmodels.Indexable has a class attribute called `objects`which returns an elasticutils `S` instance. You can then use whatever methods areavailable in elasticutils on the S instance.See:http://elasticutils.readthedocs.org/en/latest/searching.htmlhttp://elasticutils.readthedocs.org/en/latest/searching.html#filters-filterhttp://elasticutils.readthedocs.org/en/latest/searching.html#queries-queryhttp://elasticutils.readthedocs.org/en/latest/searching.html#advanced-filters-f-and-filter-raw```pythonfrom elasticutils import Ffrom .search_indexes import FileIndexresults = FileIndex.objects.filter(F(type=1) | F(type=2)).query(content__match="foo")for result in results:print result.pk, result.content```
Package: elasticpedia
ElasticpediaIndexing DBpedia with Elasticsearch.Free software: Apache Software License 2.0Documentation:https://elasticpedia.readthedocs.io.FeaturesCreate an ElasticSearch index with DBpedia entities.Redirected entities can be filtered out by providing them separately.Current version supports only .ttl files.CreditsIf you use this package for your research work, please cite:Cutrona, Vincenzo. (2020, April 21). Elasticpedia v1.0.1 (Version v1.0.1). Zenodo.This package was derived from the DBpedia indexer provided by theDBpedia Lookup project.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.0.1 (2020-04-21)[BUG-FIX] Update regex for triples parsing (handle escaped chars in Literals).1.0.0 (2020-03-30)Add support for .ttl file without prefixes only.Writing to ES using native ES-Spark library.Params can be read from env vars.Redirect files are optional.Update docs and make code citable.0.1.0 (2020-01-14)First release on PyPI.
Package: elasticpy
elasticpy===========_"ElasticSearch for the rest of us"_Python wrapper for the elasticsearch indexing utility.Author: [Luke Campbell](http://lukecampbell.github.com/) [<luke.s.campbell@gmail.com>](mailto:luke.s.campbell@gmail.com)About-----The goal of this module is to provide an intuitive interface between Python APIs and the ElasticSearch API.  Connections are provided through the `requests` library so the connections are inherently thread safe and pooled.Writing complex queries in JSON can be tedius and time consuming if you need to constantly reference the Query DSL guide, so we've wrapped most of the operations in classes with methods corresponding to the parameters of the operation.  For example:sorts = ElasticSort()sorts.sort('name',order='asc')sorts.sort('_score')----[{"name": {"order": "asc"}}, {"_score": {"order": "asc"}}]Queries, Filters, Sorts, Maps and Facets are wrapped in convenience classes.  Searching is done through the ElasticSearch class.HOWTO-----To begin using elasticpy start by importing.import elasticpy as epTo interface with the elasticsearch server use the ElasticSearch object.search = ep.ElasticSearch() # Defaults to localhost:9200To form a query use the ElasticQuery wrapper objects.query = ep.ElasticQuery().term('users':'luke')# and then pass it to the search objectsearch.search_advanced('twitter','feeds',query)>   {u'_shards': {u'failed': 0, u'successful': 5, u'total': 5},u'hits': {u'hits': [{u'_id': u'1',u'_index': u'twitter',u'_score': 0.30685282,u'_source': {u'content': u'This is an example.', u'user': u'luke'},u'_type': u'feeds'}],u'max_score': 0.30685282,u'total': 1},u'timed_out': False,u'took': 3}USAGE-----* Queries - `ElasticQuery`query = ElasticQuery()* Term Searchesquery.term(name='luke')* Text Searchesquery.text('message', 'this is a test')* Text Phrasesquery.text_phrase('message', 'this is a test')* Fuzzyquery.fuzzy('name','luke',boost=1.0)* Fuzzy Like Thisquery.fuzzy_like_this('luke',fields='_all')* **Match All**query.match_all()* Wildcardquery.wildcard('name','lu*')* Filters - `ElasticFilter`filters = ElasticFilter()* Andfilters.and_filter(query)* Boolfilters.bool_filter(must=query1, must_not=query2, should=query3)* Geo* Geo Distancefilters.geo_distance('location',{'lat':30,'lon':30}, '20km')* Geo Bounding Boxfilters.geo_bounding_box('location', {'lat':60, 'lon':60}, {'lat':30, 'lon':30})* Match Allfilters.match_all()* Rangefilters.numeric_range('price',8.0, 9.9)Copying-----------**elasticpy** - Python Wrapper for ElasticSearchCopyright 2012 UC RegentsLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
Package: elasticsearch
The official Python client for Elasticsearch.FeaturesTranslating basic Python data types to and from JSONConfigurable automatic discovery of cluster nodesPersistent connectionsLoad balancing (with pluggable selection strategy) across available nodesFailed connection penalization (time based - failed connections won’t be
retried until a timeout is reached)Support for TLS and HTTP authenticationThread safety across requestsPluggable architectureHelper functions for idiomatically using APIs togetherInstallationDownload the latest version of Elasticsearchorsign-upfor a free trial of Elastic Cloud.Refer to theInstallation sectionof the getting started documentation.ConnectingRefer to theConnecting sectionof the getting started documentation.UsageCreating an indexIndexing a documentGetting documentsSearching documentsUpdating documentsDeleting documentsDeleting an indexCompatibilityLanguage clients are forward compatible; meaning that clients support communicating
with greater or equal minor versions of Elasticsearch. Elasticsearch language clients
are only backwards compatible with default distributions and without guarantees made.If you have a need to have multiple versions installed at the same time older
versions are also released aselasticsearch2andelasticsearch5.DocumentationDocumentation for the client isavailable on elastic.coandRead the Docs.LicenseCopyright 2023 Elasticsearch B.V. Licensed under the Apache License, Version 2.0.
Package: elasticsearch2-haystack
===================================Elasticsearch 2 Engine for Haystack===================================:author: Nick Sarbicki:date: 2016/12/05.. image:: https://travis-ci.org/NDevox/elasticsearch2-haystack.svg?branch=master:target: https://travis-ci.org/NDevox/elasticsearch2-haystackThis is a fairly hacked together Elasticsearch backend for haystack which supportsall versions of Elasticsearch up to 2.4.This is strongly based on the original haystack Elasticsearch backend and essentiallyjust patches breaking changes from Elasticsearch 2 to replicate the functionality fromElasticsearch 1.Requirements============The requirements of this project largely match those of Haystack (except you can use Elasticsearch 2).You can find these here: http://django-haystack.readthedocs.io/en/latest/#requirementsOtherwise it will require the appropriate elasticsearch-py installation. In this case the majorversion must match the version of elasticsearch you are using.In general the project supports Python 2.7 and 3.4+.Installation============To run this engine in haystack you need to set your connections settings with the ``ENGINE``variable as so:.. code-block:: pythonHAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'elasticsearch2_backend.ElasticsearchSearchEngine','URL': 'http://127.0.0.1:9200/','INDEX_NAME': 'haystack',},}===========Development===========The tests from haystack for the elasticsearch engine have been ported over. To run these make sureyou have nose installed (see the ``test-requirements.txt`` file) and then run``nosetests -v --with-coverage --cover-package=elasticsearch2_backend``.
Package: elasticsearch5
Official low-level client for Elasticsearch. Its goal is to provide common
ground for all Elasticsearch-related code in Python; because of this it tries
to be opinion-free and very extendable.For a more high level client library with more limited scope, have a look atelasticsearch-dsl- a more pythonic library sitting on top ofelasticsearch-py.It provides a more convenient and idiomatic way to write and manipulatequeries. It stays close to the Elasticsearch JSON DSL, mirroring its
terminology and structure while exposing the whole range of the DSL from Python
either directly using defined classes or a queryset-like expressions.It also provides an optionalpersistence layerfor working with documents as
Python objects in an ORM-like fashion: defining mappings, retrieving and saving
documents, wrapping the document data in user-defined classes.CompatibilityThe library is compatible with Elasticsearch5.x. For Elasticsearch2.xplease useelasticsearch2and for future releases useelasticsearcch.InstallationInstall theelasticsearch5package withpip:pip install elasticsearch5Example useSimple use-case:>>> from datetime import datetime
>>> from elasticsearch import Elasticsearch

# by default we connect to localhost:9200
>>> es = Elasticsearch()

# create an index in elasticsearch, ignore status code 400 (index already exists)
>>> es.indices.create(index='my-index', ignore=400)
{u'acknowledged': True}

# datetimes will be serialized
>>> es.index(index="my-index", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()})
{u'_id': u'42', u'_index': u'my-index', u'_type': u'test-type', u'_version': 1, u'ok': True}

# but not deserialized
>>> es.get(index="my-index", doc_type="test-type", id=42)['_source']
{u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'}Full documentation.FeaturesThe client’s features include:translating basic Python data types to and from json (datetimes are not
decoded for performance reasons)configurable automatic discovery of cluster nodespersistent connectionsload balancing (with pluggable selection strategy) across all available nodesfailed connection penalization (time based - failed connections won’t be
retried until a timeout is reached)support for ssl and http authenticationthread safetypluggable architectureLicenseCopyright 2017 ElasticsearchLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Build status
Package: elasticsearch7
The official Python client for Elasticsearch.FeaturesTranslating basic Python data types to and from JSONConfigurable automatic discovery of cluster nodesPersistent connectionsLoad balancing (with pluggable selection strategy) across available nodesFailed connection penalization (time based - failed connections won’t be
retried until a timeout is reached)Support for TLS and HTTP authenticationThread safety across requestsPluggable architectureHelper functions for idiomatically using APIs togetherInstallationInstall theelasticsearchpackage withpip:$ python -m pip install elasticsearchIf your application uses async/await in Python you can install with
theasyncextra:$ python -m pip install elasticsearch[async]Read more abouthow to use asyncio with this project.CompatibilityLanguage clients are forward compatible; meaning that clients support communicating
with greater or equal minor versions of Elasticsearch. Elasticsearch language clients
are only backwards compatible with default distributions and without guarantees made.If you have a need to have multiple versions installed at the same time older
versions are also released aselasticsearch2andelasticsearch5.DocumentationDocumentation for the client isavailable on elastic.coandRead the Docs.Quick Start# Import the client from the 'elasticsearch' module>>>fromelasticsearchimportElasticsearch# Instantiate a client instance>>>client=Elasticsearch("http://localhost:9200")# Call an API, in this example `info()`>>>resp=client.info()# View the result>>>resp{"name":"instance-name","cluster_name":"cluster-name","cluster_uuid":"cluster-uuid","version":{"number":"7.14.0",...},"tagline":"You know, for Search"}You can read more aboutconfiguring the clientin the documentation.LicenseCopyright 2021 Elasticsearch B.V. Licensed under the Apache License, Version 2.0.
Package: elasticsearch8
The official Python client for Elasticsearch.FeaturesTranslating basic Python data types to and from JSONConfigurable automatic discovery of cluster nodesPersistent connectionsLoad balancing (with pluggable selection strategy) across available nodesFailed connection penalization (time based - failed connections won’t be
retried until a timeout is reached)Support for TLS and HTTP authenticationThread safety across requestsPluggable architectureHelper functions for idiomatically using APIs togetherInstallationDownload the latest version of Elasticsearchorsign-upfor a free trial of Elastic Cloud.Refer to theInstallation sectionof the getting started documentation.ConnectingRefer to theConnecting sectionof the getting started documentation.UsageCreating an indexIndexing a documentGetting documentsSearching documentsUpdating documentsDeleting documentsDeleting an indexCompatibilityLanguage clients are forward compatible; meaning that clients support communicating
with greater or equal minor versions of Elasticsearch. Elasticsearch language clients
are only backwards compatible with default distributions and without guarantees made.If you have a need to have multiple versions installed at the same time older
versions are also released aselasticsearch2andelasticsearch5.DocumentationDocumentation for the client isavailable on elastic.coandRead the Docs.LicenseCopyright 2023 Elasticsearch B.V. Licensed under the Apache License, Version 2.0.