Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export autometrics decorator from top level #15

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
push:
branches: ["main"]

env:
POETRY_VIRTUALENVS_CREATE: true
POETRY_VIRTUALENVS_IN_PROJECT: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See [Why Autometrics?](/~https://github.com/autometrics-dev#why-autometrics) for m
- Import the library in your code and use the decorator for any function:

```py
from autometrics.autometrics import autometrics
from autometrics import autometrics

@autometrics
def sayHello:
Expand Down
2 changes: 1 addition & 1 deletion examples/caller-example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from prometheus_client import start_http_server
from autometrics.autometrics import autometrics
from autometrics import autometrics
import time
import random

Expand Down
2 changes: 1 addition & 1 deletion examples/docs-example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from autometrics.autometrics import autometrics
from autometrics import autometrics


@autometrics
Expand Down
2 changes: 1 addition & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from prometheus_client import start_http_server
from autometrics.autometrics import autometrics
from autometrics import autometrics
import time
import random

Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi-example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from fastapi import FastAPI, Response
import uvicorn
from autometrics.autometrics import autometrics
from autometrics import autometrics
from prometheus_client import generate_latest

app = FastAPI()
Expand Down
2 changes: 2 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
in-project = true
1 change: 1 addition & 0 deletions src/autometrics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .decorator import *
File renamed without changes.