Skip to main content

Sunny

This is a very simple Solr interface for Python.

Installation

`bash $ pip install sunny `

Usage

Create your Solr connection (actually a pool of connections) and then pass query parameters using simple dictionaries. The raw Solr result is returned as a Python dictionary.

`python >>> import sunny >>> solr = sunny.Solr('http://localhost:8080/solr') >>> solr.query({'q': 'office', ... 'facet': 'on', ... 'facet.field': ['network', 'runtime']}) {u'responseHeader': {u'status': 0, u'QTime': ... `

Parameters

Solr parameters are passed as dictionaries where every value may be either a string or a list of strings.

wt=json is passed with every request no matter what, because JSON is easy to convert to Python objects.

Example:

`python >>> import sunny >>> solr = sunny.Solr('http://localhost:8080/solr') >>> solr.query({'q': 'office', ... 'facet': 'on', ... 'facet.field': ['network', 'runtime']}) {u'responseHeader': {u'status': 0, u'QTime': ... `

The above is equivalent to this query string: ?wt=json&q=office&facet=on&facet.field=network&facet.field=runtime

If the orderedmultidict package is installed, you may use omdict instances instead of dictionaries.

License

BSD

Metadata

Release files for sunny 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sunny 0.0.4
File Size Uploaded Provenance Actions
sunny-0.0.4.zip 5.8 kB Without provenance Details for sunny-0.0.4.zip

Release files / sunny-0.0.4.zip

Download URL sunny-0.0.4.zip
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
43bb995a1eee61544a7473cd7d48bda426f748b9b3a6e08e0365efc173a53da3
BLAKE2b-256 checksum
How to use checksums
f10f05957a2dc547ff154a4a0096959e0bb71ad4ce90f59709967cafaffcd865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sunny 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page