Skip to content

Commit

Permalink
clean code (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenyonY authored Dec 19, 2023
1 parent b7db061 commit 4f32a4c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 152 deletions.
2 changes: 1 addition & 1 deletion flaxkv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from .core import LevelDBDict, LMDBDict, RemoteDBDict

__version__ = "0.2.0-alpha"
__version__ = "0.2.0"

__all__ = [
"dictdb",
Expand Down
6 changes: 1 addition & 5 deletions flaxkv/serve/app.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import traceback

import msgspec
from litestar import Litestar, MediaType, Request, Response, get, post, status_codes
from litestar import Litestar, MediaType, Request, get, post, status_codes
from litestar.exceptions import HTTPException
from litestar.openapi import OpenAPIConfig
from litestar.response import ServerSentEvent, Stream

from .. import __version__
from ..decorators import msg_encoder
from ..pack import decode, decode_key, encode
from .interface import (
AttachRequest,
DetachRequest,
PopKeyRequest,
SetRequest,
StructDeleteBatchData,
StructSetBatchData,
StructSetData,
StructUpdateData,
)
from .manager import DBManager

Expand Down
129 changes: 0 additions & 129 deletions flaxkv/serve/client.py

This file was deleted.

17 changes: 0 additions & 17 deletions flaxkv/serve/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ class DetachRequest:
db_name: str


@dataclass
class SetRequest:
db_name: str
key: Any
value: Any


@dataclass
class PopKeyRequest:
db_name: str
key: Any


class StructSetData(msgspec.Struct):
key: bytes
value: bytes
Expand All @@ -56,7 +43,3 @@ class StructSetBatchData(msgspec.Struct):

class StructDeleteBatchData(msgspec.Struct):
keys: list[bytes]


class StructUpdateData(msgspec.Struct):
dict: bytes

0 comments on commit 4f32a4c

Please sign in to comment.