summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pyeloverblik.spec175
-rw-r--r--sources1
3 files changed, 177 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..16b16db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pyeloverblik-0.4.1.tar.gz
diff --git a/python-pyeloverblik.spec b/python-pyeloverblik.spec
new file mode 100644
index 0000000..376915d
--- /dev/null
+++ b/python-pyeloverblik.spec
@@ -0,0 +1,175 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pyeloverblik
+Version: 0.4.1
+Release: 1
+Summary: Python wrapper for eloverblik.dk API.
+License: Apache 2.0
+URL: https://github.com/JonasPed/pyeloverblik
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/75/65/a799267cee2d1fcbfb4a097494ed1ced8b5c883ef9343ec2d5fbd52196be/pyeloverblik-0.4.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+# pyeloverblik
+
+Python wrapper for eloverblik.dk api.
+
+It can read the following data from eloverblik.
+
+- Hourly data
+- Monthy data
+- Fees
+
+## Installation
+
+Install the library from PyPI: `pip install pyeloverblik`.
+
+## Usage
+
+After installation either call the library directly with `python -m pyeloverblik` or integrate the library in your code like below.
+
+```python3
+
+client = Eloverblik(REFRESH_TOKEN)
+data = client.get_latest(METERING_POINT)
+
+or
+
+client = Eloverblik(REFRESH_TOKEN)
+data = client.get_time_series(METERING_POINT, from_date=datetime.now()-timedelta(days=2), to_date=datetime.now(), aggregation='Hour')
+
+# In above example from_date and to_date is datetime objects.
+
+```
+
+
+
+
+
+%package -n python3-pyeloverblik
+Summary: Python wrapper for eloverblik.dk API.
+Provides: python-pyeloverblik
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pyeloverblik
+# pyeloverblik
+
+Python wrapper for eloverblik.dk api.
+
+It can read the following data from eloverblik.
+
+- Hourly data
+- Monthy data
+- Fees
+
+## Installation
+
+Install the library from PyPI: `pip install pyeloverblik`.
+
+## Usage
+
+After installation either call the library directly with `python -m pyeloverblik` or integrate the library in your code like below.
+
+```python3
+
+client = Eloverblik(REFRESH_TOKEN)
+data = client.get_latest(METERING_POINT)
+
+or
+
+client = Eloverblik(REFRESH_TOKEN)
+data = client.get_time_series(METERING_POINT, from_date=datetime.now()-timedelta(days=2), to_date=datetime.now(), aggregation='Hour')
+
+# In above example from_date and to_date is datetime objects.
+
+```
+
+
+
+
+
+%package help
+Summary: Development documents and examples for pyeloverblik
+Provides: python3-pyeloverblik-doc
+%description help
+# pyeloverblik
+
+Python wrapper for eloverblik.dk api.
+
+It can read the following data from eloverblik.
+
+- Hourly data
+- Monthy data
+- Fees
+
+## Installation
+
+Install the library from PyPI: `pip install pyeloverblik`.
+
+## Usage
+
+After installation either call the library directly with `python -m pyeloverblik` or integrate the library in your code like below.
+
+```python3
+
+client = Eloverblik(REFRESH_TOKEN)
+data = client.get_latest(METERING_POINT)
+
+or
+
+client = Eloverblik(REFRESH_TOKEN)
+data = client.get_time_series(METERING_POINT, from_date=datetime.now()-timedelta(days=2), to_date=datetime.now(), aggregation='Hour')
+
+# In above example from_date and to_date is datetime objects.
+
+```
+
+
+
+
+
+%prep
+%autosetup -n pyeloverblik-0.4.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pyeloverblik -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..3df9c95
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+91146670815af6f1d5e6871e07aab6d4 pyeloverblik-0.4.1.tar.gz