Giter Site home page Giter Site logo

fondat's Introduction

fondat

PyPI Python GitHub Test License

A foundation for resource-oriented backend applications.

Introduction

Fondat is a foundation for resource-oriented backend applications in Python.

Install

pip install fondat

Develop

poetry install
poetry run pre-commit install

Test

poetry run pytest

fondat's People

Contributors

bsiggers-sfdc avatar gseverina-mperativ avatar pbryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fondat's Issues

TKinter issue on latest version

On version 4.0a7 there's an from tkinter import N in validation module.
That import forces python to be configured for Tk.

8/22/2022, 1:32:06 PM	from fondat.validation import validate_arguments	*redacted*
8/22/2022, 1:32:06 PM	File "/opt/venv/lib/python3.10/site-packages/fondat/validation.py", line 5, in <module>	*redacted*
8/22/2022, 1:32:06 PM	import fondat.types	*redacted*
8/22/2022, 1:32:06 PM	File "/opt/venv/lib/python3.10/site-packages/fondat/types.py", line 11, in <module>	*redacted*
8/22/2022, 1:32:06 PM	from tkinter import N	*redacted*
8/22/2022, 1:32:06 PM	File "/usr/local/lib/python3.10/tkinter/__init__.py", line 37, in <module>	*redacted*
8/22/2022, 1:32:06 PM	import _tkinter # If this fails your Python may not be configured for Tk     *redacted*

load_datacls(dict of dicts)

I ran into fondat while looking for a way to create Resource APIs out of JSON Schema.

I wonder if it might actually be more efficient for me to define all my data classes as as pure YAML document, then create a 'load_datacls' wrapper that calls make_datacls

def make_datacls(
    cls_name: str,
    fields: Iterable[tuple[str, type] | tuple[str, type, dataclasses.Field]],
    init: bool = True,
    **kwargs,
) -> type:

The equivalent YAML would be something like:

cls_name:
   init: false
   fields:
     name: type
     name2: 
      type: int
      field: "default=5"
      description: this is a description
      optional: false
   keywords:
    namespace: "{'add_one': lambda self: self.x + 1}"

The reason, to be honest, is that I'm not sure we will always fondat (or even Python!) going forward, so I'd rather store data about our schemas as, well, data -- so we can generically reuse it with minimal parsing effort.

No documentation

Hello,
I have came across this interesting library, sadly I can't find any documentation on Google and Pypi documentation url is down (github 404). Can someone guide me to documentation/example usage?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.