Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Cybernetic Kit

The Cybernetic Kit is a set of conventions and techniques useful for making software-driven social impact. This repository holds a collection of software components for multiple fields of study, such as:

  • Open Data & Civic Engagement
  • Environmental Science
  • Library Science
  • Software Development
  • Sociology
  • Neuroscience

Meet the Cast

Data Objects

Data Objects are Python classes designed to make it easier to interact with data. Using Data Objects to describe something of interest tells computers how to manipulate, archive, inspect, and exchange data.

Built-In Data Objects

  • civic data
  • research preprints and archives
  • air quality sensor readings
  • geopolitical shapes (e.g., county, state)

How to use built-in Data Objects

Here's an example of how you'd go about storing air quality sensor readings in Elasticsearch.

from datetime import datetime

from elasticsearch_dsl import connections
from cybernetickit.sensor import AirQuality
from cybernetickit import constants

connections.create_connection(hosts=['localhost'], timeout=20)

observation = AirQuality(date=datetime.now(),
                         state='ga',
                         pollutant=constants.OZONE._asdict(),
                         units=constants.OZONE.units,
                         concentration=2.3)

observation.save()

You can use the Elasticsearch DSL to search and aggregations against an existing Elasticsearch index:

from elasticsearch_dsl import Q
s = AirQuality.search(Q('match', state='ny') & Q('match', **{'pollutant.parameter': 'OZONE'}))
response = s.execute()

for obs in response:
    ...

Custom Data Objects

Simply subclass the CoreModel and describe something of interest. Use annotations for runtime validation:

from typing from List, Optional
from cybernetickit from CoreModel, Keyword


class UseOfForce(CoreModel):
    force_applied: str = Keyword()
    deadly_force: Optional[str] = Keyword()
    source_ref: str = Keyword()
    target_ref: str = Keyword()

Getting Started

pip install cybernetickit
from cybernetickit import CoreModel

Licensing

Cybernetic Kit
Copyright (C) 2021  Civic Hacker, LLC

This program is free software: you can redistribute it and/or modify
it under the terms of the Lesser GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Lesser GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Metadata

Release files for cybernetickit 0.3.2b4

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

Source distribution (sdist)

Source distribution for cybernetickit 0.3.2b4
File Size Uploaded
cybernetickit-0.3.2b4.tar.gz 23.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cybernetickit 0.3.2b4
File Interpreter ABI Platform
cybernetickit-0.3.2b4-py3-none-any.whl Python 3 none any Details

Total release size: 59.4 kB

Release files / cybernetickit-0.3.2b4.tar.gz

Download URL cybernetickit-0.3.2b4.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
013b5cf01144cd5dfde44959e3bdca50ceacb80a9f350bb1685a6e064071fbaa
BLAKE2b-256 checksum
How to use checksums
0979af7fb1b3199d951a5dc7527a3e3b8c5d027c382021bfe2c30afcac0bd606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-40-generic

Release files / cybernetickit-0.3.2b4-py3-none-any.whl

Download URL cybernetickit-0.3.2b4-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b043cd6ac23182661f5fbbbf4ebd698775a61bb5cb91841f075d8e539af03ee
BLAKE2b-256 checksum
How to use checksums
153bd45b32de2070753285a3396445121da3b78fef9e993b24668482948d7512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-40-generic
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