예제 #1
0
def main():
    session = AmunSession()

    # Get the first valuation and duplicate it
    valuations = session.get_valuations()
    valuation_id = valuations[0]["id"]

    new_valuation_id = copy_valuation(valuation_id, session)
예제 #2
0
def main():
    # Calling with no token in constructor will load one from an environment variable if provided
    # or a file in HOME/.
    session = AmunSession()
    print("Getting Valuations")

    valuations = session.get_valuations()

    numToShow = 5
    print(f"found {len(valuations)} valuations print first {numToShow}")
    for val in valuations[:numToShow]:
        print(val)

    # filters valuations through the name, description and author
    # (includes MySQL avanced search query functionalities)
    filtered_valuations = session.get_valuations(searchText="test")
    print(f"found {len(filtered_valuations)} with the custom search text.")
    for val in filtered_valuations:
        print(val)

    print("Done")