Skip to content

Commit be6329e

Browse files
author
Saurabh Kumar
committed
apply rebranding
1 parent 12d182a commit be6329e

4 files changed

Lines changed: 63 additions & 53 deletions

File tree

LICENSE.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
python-dotenv
2+
Copyright (c) 2014, Saurabh Kumar
3+
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice,
10+
this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
* Neither the name of python-dotenv nor the names of its contributors
15+
may be used to endorse or promote products derived from this software
16+
without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
30+
131
django-dotenv-rw
232
Copyright (c) 2013, Ted Tieken
333

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# django-dotenv-rw
1+
# python-dotenv
22

3-
[![Build Status](https://travis-ci.org/theskumar/django-dotenv-rw.svg?branch=master)](https://travis-ci.org/theskumar/django-dotenv-rw)
3+
[![Build Status](https://travis-ci.org/theskumar/python-dotenv.svg?branch=master)](https://travis-ci.org/theskumar/django-dotenv-rw)
44

55
Forked from awesome but simpler [django-dotenv](https://github.com/jacobian/django-dotenv). Removes black magic, makes loading .env in settings.py easier, adds remote .env file management capabilities. Works as a drop-in replacement for django-dotenv.
66

@@ -22,7 +22,7 @@ doesn't. Let's fix that.
2222
## Installation
2323

2424
```
25-
pip install git+ssh://git@github.com/theskumar/django-dotenv-rw.git
25+
pip install git+ssh://git@github.com/theskumar/python-dotenv.git
2626
```
2727

2828
# Usage
@@ -69,48 +69,48 @@ Usage is designed to mirror the heroku config api very closely.
6969
Get all your remote config info with `fab config`
7070
```
7171
$ fab config
72-
[...webfactional.com] Executing task 'config'
73-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env
74-
[...webfactional.com] out: DJANGO_DEBUG="true"
75-
[...webfactional.com] out: DJANGO_ENV="test"
72+
[...example.com] Executing task 'config'
73+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env
74+
[...example.com] out: DJANGO_DEBUG="true"
75+
[...example.com] out: DJANGO_ENV="test"
7676
```
7777

7878
Set remote config variables with `fab config:set,[key],[value]`
7979
```
8080
$ fab config:set,hello,world
81-
[...webfactional.com] Executing task 'config'
82-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set hello world
83-
[...webfactional.com] out: hello="world"
81+
[...example.com] Executing task 'config'
82+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set hello world
83+
[...example.com] out: hello="world"
8484
```
8585

8686
Get a single remote config variables with `fab config:get,[key]`
8787
```
8888
$ fab config:get,hello
89-
[...webfactional.com] Executing task 'config'
90-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env get hello
91-
[...webfactional.com] out: hello="world"
89+
[...example.com] Executing task 'config'
90+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env get hello
91+
[...example.com] out: hello="world"
9292
```
9393

9494
Delete a remote config variables with `fab config:unset,[key]`
9595
```
9696
$ fab config:unset,hello
97-
[...webfactional.com] Executing task 'config'
98-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env unset hello
99-
[...webfactional.com] out: unset hello
97+
[...example.com] Executing task 'config'
98+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env unset hello
99+
[...example.com] out: unset hello
100100
```
101101

102102
Thanks entirely to fabric and not one bit to this project, you can chain commands like so`fab config:set,[key1],[value1] config:set,[key2],[value2]`
103103
```
104104
$ fab config:set,hello,world config:set,foo,bar config:set,fizz,buzz
105-
[...webfactional.com] Executing task 'config'
106-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set hello world
107-
[...webfactional.com] out: hello="world"
108-
[...webfactional.com] Executing task 'config'
109-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set foo bar
110-
[...webfactional.com] out: foo="bar"
111-
[...webfactional.com] Executing task 'config'
112-
[...webfactional.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set fizz buzz
113-
[...webfactional.com] out: fizz="buzz"
114-
```
115-
116-
That's it. Webfaction, or whoever your non-paas host is, is now 1 facor closer to an easy 12 factor app.
105+
[...example.com] Executing task 'config'
106+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set hello world
107+
[...example.com] out: hello="world"
108+
[...example.com] Executing task 'config'
109+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set foo bar
110+
[...example.com] out: foo="bar"
111+
[...example.com] Executing task 'config'
112+
[...example.com] run: dotenv -f /home/me/webapps/myapp/myapp/.env set fizz buzz
113+
[...example.com] out: fizz="buzz"
114+
```
115+
116+
That's it. example.com, or whoever your non-paas host is, is now 1 facor closer to an easy 12 factor app.

dotenv.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import sys
32
import warnings
43
from collections import OrderedDict
54

@@ -18,25 +17,6 @@ def load_dotenv(dotenv_path):
1817
return True
1918

2019

21-
def read_dotenv(dotenv_path=None):
22-
"""
23-
Prior name of load_dotenv function.
24-
25-
Deprecated and pending removal
26-
27-
If not given a path to a dotenv path, does filthy magic stack backtracking
28-
to find manage.py and then find the dotenv.
29-
"""
30-
warnings.warn("read_dotenv deprecated, use load_dotenv instead")
31-
if dotenv_path is None:
32-
warnings.warn(
33-
"read_dotenv without an explicit path is deprecated and will be removed soon")
34-
frame = sys._getframe()
35-
dotenv_path = os.path.join(
36-
os.path.dirname(frame.f_back.f_code.co_filename), '.env')
37-
return load_dotenv(dotenv_path)
38-
39-
4020
def get_key(dotenv_path, key_to_get):
4121
"""
4222
Gets the value of a given key from the given .env

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from setuptools import setup
22

33
setup(
4-
name="django-dotenv-rw",
4+
name="python-dotenv",
55
description=".env file settings for non-heroku setups",
6-
version="0.1",
7-
author="Ted Tieken",
8-
author_email="ted@sittingaround.com",
9-
url="http://github.com/tedtieken/django-dotenv-rw",
6+
version="0.1.0",
7+
author="Saurabh Kumar",
8+
author_email="me+github@saurabh-kumar.com",
9+
url="http://github.com/theskumar/python-dotenv",
1010
py_modules=['dotenv'],
1111
install_requires=[
1212
'click>=3.0',

0 commit comments

Comments
 (0)