Skip to main content

cloudnode is for building apps on home servers.

Project description

cloudnode is for building apps on home servers.

cloudnode is built for hosting small single-node servers on home systems in the open-source, and for engineering containerized apps on top of its core services, including ingress, search, storage, code bases, cloud functions, apis, and system logging. These containerized apps can be distributed as any others.

cloudnode is built for novice engineers to prevent repeating development across the open-source and empower rapid expand core services and prototyping of features:

  • search and storage using scalable engines
  • self-hosting of software services and code bases
  • cloud functions from direct source code
  • building from scalable frameworks including ElasticSearch

installation

pip install cloudnode

Docker is required to host applications including search.

Core Components

SwiftData

SwiftData is an extension of dataclasses built for typed sharing, storage, and search across filesystems and ElasticSearch. It includes ease-of-use tools and can directly spin-up search engines, and interact with common or complex query types, including search bar text, elasticsearch-dsl, and SQL. SwiftData also extends fields for working with complex datatypes such as process flags, deep learning embeddings, geospatial data, and others; see our SpotifyPlaylist example and demo.py for a full working example of the SwiftData database search system.

from cloudnode import SwiftData
import dataclasses

@dataclasses.dataclass
class Meme(SwiftData):
    url_image: str
    url_knowyour: str
    text_image: str

five-minute demo: your own search engine

This code sample is part of a full working example in demo.py.

from cloudnode import SwiftData, sd, SwiftDataBackend
import dataclasses

@dataclasses.dataclass
class WebPage(SwiftData):
    url: sd.string()                  # an exact string; facilitating exact matches only
    domain: sd.string()
    text: sd.string(analyze=True)     # a body of text; tokenized, analyzed and searchable
    html: sd.string(dont_index=True)  # a string stored in the engine but intended for search
    labels: sd.string(list=True)      # a list of exact strings; matching one or all is possible
    now: sd.timestamp()               # a timestamp; searchable using windows of time
    geo: sd.geopoint(list=True)       # a list of gps defined spots; searchable via radius

items = []  # see demo.py
applet = "demo"
index = "early"
database_password = "password"

# start the search engine backend
swift = SwiftDataBackend().start(database_password, exist_ok=True, rebuild=True)
WebPage.create_index(index, exist_ok=True)

for item in items:  # if the items are not already in the database; add then the same was as saving to file system
    if not WebPage.exists(index, item.id, es=True):
        item.save(index, es=True)
WebPage.refresh_index(index, es=True)

# familiar search bar queries is one example of how to access search
results = WebPage.search_bar(index, "domain:nytimes.com text:covid")

# snapshots persist after deleting docker
swift.snapshot_save(applet)
print(swift.snapshot_list(applet))
swift.stop(not_exist_ok=False)

Where are the other components?

We are in the process of porting over from other repositories.

ferris.bueller.png

Licensing & Stuff

Hey. I took time to build this. There are a lot of pain points that I solved for you, and a lot of afternoons staring outside the coffeeshop window at the sunshine. Not years, because I am a very skilled, competent software engineer. But enough, okay? Use this package. Ask for improvements. Integrate this into your products. Complain when it breaks. Reference the package by company and name. Starlight CloudNode. Email us to let us know!

Hire us to build production.




Starlight LLC
Copyright 2024
All Rights Reserved
GNU GENERAL PUBLIC LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudnode-2024.9.0.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

cloudnode-2024.9.0-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file cloudnode-2024.9.0.tar.gz.

File metadata

  • Download URL: cloudnode-2024.9.0.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for cloudnode-2024.9.0.tar.gz
Algorithm Hash digest
SHA256 aa970b1ed7a3336667ede5ca74d0c1fcd01c175f81ee64b7f8bb8a22137aed89
MD5 ded7c52292a6b71fcd8e0eae993c05cf
BLAKE2b-256 1b3dcdd19d8d4a403e41c6a843f31deec629c103710aaa67f0d59b821e25a6c4

See more details on using hashes here.

File details

Details for the file cloudnode-2024.9.0-py3-none-any.whl.

File metadata

  • Download URL: cloudnode-2024.9.0-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for cloudnode-2024.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c32124e2b045262308b526fa36a3e108a54d9cd68439fd31b767d29a3be32c6
MD5 19619bc7f8b25425953e741d82658826
BLAKE2b-256 34312c0735ebf3865a9f5a499918c89af55b0db8c82cde398366cf3dfe8bf06c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page